)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"1d084c9f3c5c37fe2d3d6ad2cb07c4e370b104ec","unresolved":false,"context_lines":[{"line_number":19,"context_line":"if the q35 machine type will be used by the instance while looking up"},{"line_number":20,"context_line":"disk mapping information."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The signature of _get_disk_bus_for_device_type has changed to"},{"line_number":23,"context_line":"accommodate the passing of LibvirtDriver._host. This allows the host"},{"line_number":24,"context_line":"capabilities to be passed to the extracted get_machine_type method. This"},{"line_number":25,"context_line":"unfortunately results in a large amount of unavoidable test file damage."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9fb8cfa7_e482aac8","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":46},"updated":"2019-06-04 18:37:36.000000000","message":"I\u0027ve leave this in the gate overnight but I need to add get_info_from_bdm, get_root_info, default_device_names, get_disk_mapping and get_disk_info here.","commit_id":"b5466b00fca8f126c7718ae90ff53f998f1b1286"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"d12097ff8378751c55ce20da1e9aafabfbe77b5a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Don\u0027t assume the guest machine type to be of \u0027pc\u0027"},{"line_number":14,"context_line":"https://bugs.launchpad.net/nova/+bug/1780138"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"To enable this the _get_machine_type method is extracted from the"},{"line_number":17,"context_line":"Libvirt driver into the utility module. This allows the method to be"},{"line_number":18,"context_line":"reused by the blockinfo module so a lookup can be preformed to determine"},{"line_number":19,"context_line":"if the Q35 machine type will be used by the instance while looking up"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9fb8cfa7_2aadc830","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":56},"updated":"2019-06-06 09:08:42.000000000","message":"Not merely extracted; but it was also _modifed_ to remove \u0027mach_type_ parameter.  If re-spinning, please state it as such—it is harder to detect in the move from driver.py to utils.py.\n\n(That\u0027s why I prefer such \"move-the-method-and-clean-it-up\" patches to be separate ones.  To aid the reviewer.)","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"07e8739c3f82f589d7fec41323914f02b521b401","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Don\u0027t assume the guest machine type to be of \u0027pc\u0027"},{"line_number":14,"context_line":"https://bugs.launchpad.net/nova/+bug/1780138"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"To enable this the _get_machine_type method is extracted from the"},{"line_number":17,"context_line":"Libvirt driver into the utility module. This allows the method to be"},{"line_number":18,"context_line":"reused by the blockinfo module so a lookup can be preformed to determine"},{"line_number":19,"context_line":"if the Q35 machine type will be used by the instance while looking up"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9fb8cfa7_f9122858","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":56},"in_reply_to":"9fb8cfa7_0d3fbe25","updated":"2019-06-06 12:42:47.000000000","message":"i agree with lee the external signature and the public behaviour of the function are unchanged.\n\ni asked lee to refactor the internal implementation to simplify the function by removing the use of the singel return anti pattern but i dont think needs to be called out\nexplcitly since it will not affect any user of this function.\n\nif this needs to be reworked then it could be added but i dont think its required on its own.","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"f196db219a6f61913ac5034f195f2ded75e433cf","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Don\u0027t assume the guest machine type to be of \u0027pc\u0027"},{"line_number":14,"context_line":"https://bugs.launchpad.net/nova/+bug/1780138"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"To enable this the _get_machine_type method is extracted from the"},{"line_number":17,"context_line":"Libvirt driver into the utility module. This allows the method to be"},{"line_number":18,"context_line":"reused by the blockinfo module so a lookup can be preformed to determine"},{"line_number":19,"context_line":"if the Q35 machine type will be used by the instance while looking up"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9fb8cfa7_0d3fbe25","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":56},"in_reply_to":"9fb8cfa7_2aadc830","updated":"2019-06-06 09:36:08.000000000","message":"The mach_type variable was removed, the signature hasn\u0027t changed. I appreciate that it could still be useful to document that in the commit given the size of this change but the actual logic has remained the same.","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d50b9132215188c2a161392a2bc2e60fce90a9f2","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Don\u0027t assume the guest machine type to be of \u0027pc\u0027"},{"line_number":14,"context_line":"https://bugs.launchpad.net/nova/+bug/1780138"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"To enable this the _get_machine_type method is extracted from the"},{"line_number":17,"context_line":"Libvirt driver into the utility module. This allows the method to be"},{"line_number":18,"context_line":"reused by the blockinfo module so a lookup can be preformed to determine"},{"line_number":19,"context_line":"if the Q35 machine type will be used by the instance while looking up"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9fb8cfa7_941df374","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":56},"in_reply_to":"9fb8cfa7_f9122858","updated":"2019-06-06 14:01:50.000000000","message":"If I\u0027m not mistaken, the logic of the method *was* changed. See inline.\n\nMaybe that\u0027s okay, but I don\u0027t know.","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8732f2c1ba1609e10f53c1e56a2837fb759dff83","unresolved":false,"context_lines":[{"line_number":20,"context_line":"disk mapping information."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Related-bug: 1780138"},{"line_number":23,"context_line":"Closes-bug: 1831538"},{"line_number":24,"context_line":"Change-Id: Id97f4baddcf2caff91599773d9b5de5181b7fdf6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9fb8cfa7_ab56955b","line":23,"updated":"2019-06-06 15:22:30.000000000","message":"nit: don\u0027t these usually have a \u0027#\u0027 before them? Don\u0027t think it matters though","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"7c1b5be9a38796d1a5cdc9efde17ad28534b0535","unresolved":false,"context_lines":[{"line_number":20,"context_line":"disk mapping information."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Related-bug: 1780138"},{"line_number":23,"context_line":"Closes-bug: 1831538"},{"line_number":24,"context_line":"Change-Id: Id97f4baddcf2caff91599773d9b5de5181b7fdf6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9fb8cfa7_2e007301","line":23,"in_reply_to":"9fb8cfa7_ab56955b","updated":"2019-06-06 15:34:15.000000000","message":"Only downstream :)","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"094b0d2963287f59310225d67718f32954b3755b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"disk mapping information."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Related-bug: 1780138"},{"line_number":23,"context_line":"Closes-bug: 1831538"},{"line_number":24,"context_line":"Change-Id: Id97f4baddcf2caff91599773d9b5de5181b7fdf6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9fb8cfa7_2e6153aa","line":23,"in_reply_to":"9fb8cfa7_ab56955b","updated":"2019-06-06 15:33:36.000000000","message":"it does for the launchpad hack AFAIK","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"80d9fc54fa8595cb225f0868d7465bc02cd9a06e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Don\u0027t assume the guest machine type to be of \u0027pc\u0027"},{"line_number":14,"context_line":"https://bugs.launchpad.net/nova/+bug/1780138"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change now ensures the blockinfo.get_disk_bus_for_device_type"},{"line_number":17,"context_line":"method will now return \"sata\" as the bus type when the Q35 machine type"},{"line_number":18,"context_line":"is used for cdrom devices on QEMU or KVM hosts that are not PPC, S390 or"},{"line_number":19,"context_line":"AArch64 based."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9fb8cfa7_d562693e","line":16,"range":{"start_line":16,"start_character":12,"end_line":16,"end_character":15},"updated":"2019-06-07 21:17:08.000000000","message":"strike","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"}],"nova/objects/fields.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"62521df0c9467e2bcf408372433ad47868f19103","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        :returns: the canonicalized host architecture"},{"line_number":160,"context_line":"        \"\"\""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        return cls.canonicalize(os.uname()[4])"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    @classmethod"},{"line_number":165,"context_line":"    def is_valid(cls, name):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_2b4dc599","line":162,"updated":"2019-06-06 15:23:03.000000000","message":"4. getting it from here, which *should* always be the machine/hardware identifier field from [1]\n\n[1] https://docs.python.org/3.6/library/os.html#os.uname","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"978969951ff5ad02ceaa66233172a2705de329fb","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        :returns: the canonicalized host architecture"},{"line_number":160,"context_line":"        \"\"\""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        return cls.canonicalize(os.uname()[4])"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    @classmethod"},{"line_number":165,"context_line":"    def is_valid(cls, name):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_6e4bcb58","line":162,"in_reply_to":"9fb8cfa7_2b4dc599","updated":"2019-06-06 15:26:39.000000000","message":"Correct. Use the value specified by the host unless it\u0027s overridden by the host.","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"}],"nova/tests/functional/libvirt/base.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c28e128a3aec97db3aa1bbe71b7556c7de481ac6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.addCleanup(_p.stop)"},{"line_number":59,"context_line":"        # As above, mock the \u0027get_arch\u0027 function as we may need to provide"},{"line_number":60,"context_line":"        # different host architectures during some tests."},{"line_number":61,"context_line":"        _a \u003d mock.patch(\u0027nova.virt.libvirt.utils.get_arch\u0027)"},{"line_number":62,"context_line":"        self.mock_arch \u003d _a.start()"},{"line_number":63,"context_line":"        # Default to X86_64"},{"line_number":64,"context_line":"        self.mock_arch.return_value \u003d obj_fields.Architecture.X86_64"},{"line_number":65,"context_line":"        self.addCleanup(_a.stop)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _setup_compute_service(self):"},{"line_number":68,"context_line":"        # NOTE(stephenfin): We don\u0027t start the compute service here as we wish"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fb8cfa7_95f13598","line":65,"range":{"start_line":61,"start_character":0,"end_line":65,"end_character":32},"updated":"2019-06-10 21:54:43.000000000","message":"Since we\u0027re importing fixtures, this can be spelled:\n\n self.mock_arch \u003d self.useFixture(fixtures.MockPatch(\n     \u0027nova.virt.libvirt.utils.get_arch\u0027,\n     return_value\u003dobj_fields.Architecture.X86_64)).mock\n\n(The one above can be done similarly)\n\n[Later] But actually this mock appears to be unnecessary: I removed it and the libvirt functional tests still pass.","commit_id":"9d6195dcdf7d200975b3208614285aabc608ef95"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"bdeb89e1b3a14b8afa7e6b889bfaf193b8e8dc1d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.addCleanup(_p.stop)"},{"line_number":59,"context_line":"        # As above, mock the \u0027get_arch\u0027 function as we may need to provide"},{"line_number":60,"context_line":"        # different host architectures during some tests."},{"line_number":61,"context_line":"        _a \u003d mock.patch(\u0027nova.virt.libvirt.utils.get_arch\u0027)"},{"line_number":62,"context_line":"        self.mock_arch \u003d _a.start()"},{"line_number":63,"context_line":"        # Default to X86_64"},{"line_number":64,"context_line":"        self.mock_arch.return_value \u003d obj_fields.Architecture.X86_64"},{"line_number":65,"context_line":"        self.addCleanup(_a.stop)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _setup_compute_service(self):"},{"line_number":68,"context_line":"        # NOTE(stephenfin): We don\u0027t start the compute service here as we wish"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fb8cfa7_0b6e86c8","line":65,"range":{"start_line":61,"start_character":0,"end_line":65,"end_character":32},"in_reply_to":"9fb8cfa7_283ef0d9","updated":"2019-06-10 22:45:57.000000000","message":"Interesting. I\u0027d be shocked if this is the only thing that breaks running the libvirt functional suite on non-X86 (or even non-Linux for that matter). All the more reason to have it in a separate change, I suppose, so we can revert it if someone screams?","commit_id":"9d6195dcdf7d200975b3208614285aabc608ef95"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e7c6f034036fde926a4228a8ac0a9acd5603857c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.addCleanup(_p.stop)"},{"line_number":59,"context_line":"        # As above, mock the \u0027get_arch\u0027 function as we may need to provide"},{"line_number":60,"context_line":"        # different host architectures during some tests."},{"line_number":61,"context_line":"        _a \u003d mock.patch(\u0027nova.virt.libvirt.utils.get_arch\u0027)"},{"line_number":62,"context_line":"        self.mock_arch \u003d _a.start()"},{"line_number":63,"context_line":"        # Default to X86_64"},{"line_number":64,"context_line":"        self.mock_arch.return_value \u003d obj_fields.Architecture.X86_64"},{"line_number":65,"context_line":"        self.addCleanup(_a.stop)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _setup_compute_service(self):"},{"line_number":68,"context_line":"        # NOTE(stephenfin): We don\u0027t start the compute service here as we wish"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fb8cfa7_283ef0d9","line":65,"range":{"start_line":61,"start_character":0,"end_line":65,"end_character":32},"in_reply_to":"9fb8cfa7_68e4e8e1","updated":"2019-06-10 22:39:33.000000000","message":"I ended up mocking it like this so we could still run these tests on non x86_64 hosts (AArch64 etc) without the tests looking up the underlying host arch and potentially failing. I don\u0027t know if that\u0027s a valid concern tbh, if not I\u0027m happy to remove this.","commit_id":"9d6195dcdf7d200975b3208614285aabc608ef95"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b3000f09262813ae1e0c0f4fb42915aa98add205","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.addCleanup(_p.stop)"},{"line_number":59,"context_line":"        # As above, mock the \u0027get_arch\u0027 function as we may need to provide"},{"line_number":60,"context_line":"        # different host architectures during some tests."},{"line_number":61,"context_line":"        _a \u003d mock.patch(\u0027nova.virt.libvirt.utils.get_arch\u0027)"},{"line_number":62,"context_line":"        self.mock_arch \u003d _a.start()"},{"line_number":63,"context_line":"        # Default to X86_64"},{"line_number":64,"context_line":"        self.mock_arch.return_value \u003d obj_fields.Architecture.X86_64"},{"line_number":65,"context_line":"        self.addCleanup(_a.stop)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _setup_compute_service(self):"},{"line_number":68,"context_line":"        # NOTE(stephenfin): We don\u0027t start the compute service here as we wish"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fb8cfa7_68e4e8e1","line":65,"range":{"start_line":61,"start_character":0,"end_line":65,"end_character":32},"in_reply_to":"9fb8cfa7_95f13598","updated":"2019-06-10 22:01:52.000000000","message":"Done via https://review.opendev.org/664449","commit_id":"9d6195dcdf7d200975b3208614285aabc608ef95"}],"nova/tests/unit/virt/libvirt/fake_libvirt_utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d50b9132215188c2a161392a2bc2e60fce90a9f2","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    return libvirt_utils.cpu_features_to_traits(features)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def get_machine_type(image_meta, caps):"},{"line_number":183,"context_line":"    return libvirt_utils.get_machine_type(image_meta, caps)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_b44837cc","line":182,"updated":"2019-06-06 14:01:50.000000000","message":"Can we please stop adding to fake_libvirt_utils? Just mock the driver method where needed.\n\n(More: We\u0027re trying to get rid of this thing [1] and every addition causes a merge conflict.)\n\n[1] https://review.opendev.org/#/q/topic:fake-cleanup+(status:open+OR+status:merged)","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"20cb9b86c81be876349ecb216edbdd186c53a0d1","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    return libvirt_utils.cpu_features_to_traits(features)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def get_machine_type(image_meta, caps):"},{"line_number":183,"context_line":"    return libvirt_utils.get_machine_type(image_meta, caps)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_8fa4feba","line":182,"in_reply_to":"9fb8cfa7_b44837cc","updated":"2019-06-06 14:18:57.000000000","message":"TIL - I\u0027ll look at removing this now.","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"d344f1ed4f4b877738a6219e637a157fd1d84643","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    return libvirt_utils.cpu_features_to_traits(features)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def get_machine_type(image_meta):"},{"line_number":183,"context_line":"    return libvirt_utils.get_machine_type(image_meta)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def get_default_machine_type(arch):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fb8cfa7_e0b9e8cb","line":183,"range":{"start_line":182,"start_character":0,"end_line":183,"end_character":53},"updated":"2019-06-08 15:41:34.000000000","message":"This is back, I can\u0027t think of way of avoiding this while we\u0027re still using fake_libvirt_utils itself. Happy to work on I8e5a122cc547222249973cf595d90c2d8d5658d4 to address any issues this causes.","commit_id":"523b30a2791189ece6ded5152f7169377b3a7e91"}],"nova/tests/unit/virt/libvirt/test_blockinfo.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4b1aa3101b604bb22edec0873dc7a528c8afc2a8","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"        self.image_meta \u003d objects.ImageMeta("},{"line_number":1076,"context_line":"            disk_format\u003d\u0027raw\u0027,"},{"line_number":1077,"context_line":"            properties\u003dobjects.ImageMetaProps())"},{"line_number":1078,"context_line":""},{"line_number":1079,"context_line":"        self.virt_type \u003d \u0027kvm\u0027"},{"line_number":1080,"context_line":"        self.flavor \u003d objects.Flavor(swap\u003d4)"},{"line_number":1081,"context_line":"        self.patchers \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_bea27f99","side":"PARENT","line":1078,"updated":"2019-06-04 16:40:09.000000000","message":"Unrelated whitespace damage.","commit_id":"2ea6e6f8db9fc6cecf389cacdd0d82d8226b99fb"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"87148154f160a8c1ff321459b125c59cd2d1ce13","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"        self.image_meta \u003d objects.ImageMeta("},{"line_number":1076,"context_line":"            disk_format\u003d\u0027raw\u0027,"},{"line_number":1077,"context_line":"            properties\u003dobjects.ImageMetaProps())"},{"line_number":1078,"context_line":""},{"line_number":1079,"context_line":"        self.virt_type \u003d \u0027kvm\u0027"},{"line_number":1080,"context_line":"        self.flavor \u003d objects.Flavor(swap\u003d4)"},{"line_number":1081,"context_line":"        self.patchers \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_09403756","side":"PARENT","line":1078,"in_reply_to":"9fb8cfa7_bea27f99","updated":"2019-06-04 18:06:53.000000000","message":"Done","commit_id":"2ea6e6f8db9fc6cecf389cacdd0d82d8226b99fb"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4b1aa3101b604bb22edec0873dc7a528c8afc2a8","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":835,"context_line":"        self.assertRaises(exception.UnsupportedVirtType,"},{"line_number":836,"context_line":"                          blockinfo.get_disk_bus_for_device_type,"},{"line_number":837,"context_line":"                          instance, \u0027kvm1\u0027, image_meta, None)"},{"line_number":838,"context_line":""},{"line_number":839,"context_line":"    def test_fail_get_disk_bus_for_disk_dev(self):"},{"line_number":840,"context_line":"        self.assertRaises(exception.NovaException,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_be94bf45","line":837,"range":{"start_line":837,"start_character":56,"end_line":837,"end_character":60},"updated":"2019-06-04 16:40:09.000000000","message":"We should pass real data here, or a mock sentinel which will explode if we touch it. Passing None has the potential to bite us.","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"87148154f160a8c1ff321459b125c59cd2d1ce13","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":835,"context_line":"        self.assertRaises(exception.UnsupportedVirtType,"},{"line_number":836,"context_line":"                          blockinfo.get_disk_bus_for_device_type,"},{"line_number":837,"context_line":"                          instance, \u0027kvm1\u0027, image_meta, None)"},{"line_number":838,"context_line":""},{"line_number":839,"context_line":"    def test_fail_get_disk_bus_for_disk_dev(self):"},{"line_number":840,"context_line":"        self.assertRaises(exception.NovaException,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_84608ed0","line":837,"range":{"start_line":837,"start_character":56,"end_line":837,"end_character":60},"in_reply_to":"9fb8cfa7_be94bf45","updated":"2019-06-04 18:06:53.000000000","message":"That\u0027s what I\u0027m actually trying to do by passing None here. We don\u0027t currently reach the block that uses the host connection and if we did this would implode given the use of None.","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4b1aa3101b604bb22edec0873dc7a528c8afc2a8","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"class DefaultDeviceNamesTestCase(test.NoDBTestCase):"},{"line_number":1092,"context_line":"    def setUp(self):"},{"line_number":1093,"context_line":"        super(DefaultDeviceNamesTestCase, self).setUp()"},{"line_number":1094,"context_line":"        self.useFixture(fakelibvirt.FakeLibvirtFixture())"},{"line_number":1095,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":1096,"context_line":"        self.instance \u003d objects.Instance("},{"line_number":1097,"context_line":"                uuid\u003d\u002732dfcb37-5af1-552b-357c-be8c3aa38310\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_fe98f76a","line":1094,"updated":"2019-06-04 16:40:09.000000000","message":"You could also move this to the only test which requires it. Not important.","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"629471c3a8f07b811f5545756df8de55511a8b4d","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":850,"context_line":"        self.assertRaises(exception.UnsupportedVirtType,"},{"line_number":851,"context_line":"                          blockinfo.get_disk_bus_for_device_type,"},{"line_number":852,"context_line":"                          instance, \u0027kvm1\u0027, image_meta, None)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def test_fail_get_disk_bus_for_disk_dev(self):"},{"line_number":855,"context_line":"        self.assertRaises(exception.NovaException,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_efc4b961","line":852,"range":{"start_line":852,"start_character":56,"end_line":852,"end_character":60},"updated":"2019-06-05 08:36:17.000000000","message":"I remain not a fan. It\u0027s not at all obvious here that you\u0027re explicitly asserting that the host object has not been used. At the very least I\u0027d add a comment.","commit_id":"30d79488bc6dc63ebf6462d0df6b29115ca99de4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8af5ff7f1a442224bf8725d165c83c1cefa0b087","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":850,"context_line":"        self.assertRaises(exception.UnsupportedVirtType,"},{"line_number":851,"context_line":"                          blockinfo.get_disk_bus_for_device_type,"},{"line_number":852,"context_line":"                          instance, \u0027kvm1\u0027, image_meta, None)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def test_fail_get_disk_bus_for_disk_dev(self):"},{"line_number":855,"context_line":"        self.assertRaises(exception.NovaException,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_6e7e826c","line":852,"range":{"start_line":852,"start_character":56,"end_line":852,"end_character":60},"updated":"2019-06-05 16:09:34.000000000","message":"Still not a fan: I\u0027d prefer something explicit.\n\nNot quite enough for a -1, though.","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e31572af5dc7ed0017c91182ac1d848fbd8dd219","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":850,"context_line":"        self.assertRaises(exception.UnsupportedVirtType,"},{"line_number":851,"context_line":"                          blockinfo.get_disk_bus_for_device_type,"},{"line_number":852,"context_line":"                          instance, \u0027kvm1\u0027, image_meta, None)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def test_fail_get_disk_bus_for_disk_dev(self):"},{"line_number":855,"context_line":"        self.assertRaises(exception.NovaException,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_c2317f0d","line":852,"range":{"start_line":852,"start_character":56,"end_line":852,"end_character":60},"in_reply_to":"9fb8cfa7_6e7e826c","updated":"2019-06-05 20:14:02.000000000","message":"Done","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"89bbcb1710a928726ecfb1506954d7f2fd8d4287","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        self.assertRaises(exception.UnsupportedVirtType,"},{"line_number":852,"context_line":"                          blockinfo.get_disk_bus_for_device_type,"},{"line_number":853,"context_line":"                          instance, \u0027kvm1\u0027, image_meta, host)"},{"line_number":854,"context_line":"        host.get_capabilities.assert_not_called()"},{"line_number":855,"context_line":""},{"line_number":856,"context_line":"    def test_fail_get_disk_bus_for_disk_dev(self):"},{"line_number":857,"context_line":"        self.assertRaises(exception.NovaException,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_4a003c68","line":854,"updated":"2019-06-06 08:56:34.000000000","message":"Awww, thanks ;)","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8c1e5bb1107f17897efb7e3feb0b6e960df7026c","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        self.assertRaises(exception.UnsupportedVirtType,"},{"line_number":852,"context_line":"                          blockinfo.get_disk_bus_for_device_type,"},{"line_number":853,"context_line":"                          instance, \u0027kvm1\u0027, image_meta, host)"},{"line_number":854,"context_line":"        host.get_capabilities.assert_not_called()"},{"line_number":855,"context_line":""},{"line_number":856,"context_line":"    def test_fail_get_disk_bus_for_disk_dev(self):"},{"line_number":857,"context_line":"        self.assertRaises(exception.NovaException,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_b454b7cb","line":854,"in_reply_to":"9fb8cfa7_4a003c68","updated":"2019-06-06 13:59:17.000000000","message":"mock 3.0 \u003c3 (this was surprisingly not a thing in 2.0)","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"80d9fc54fa8595cb225f0868d7465bc02cd9a06e","unresolved":false,"context_lines":[{"line_number":829,"context_line":"                                                     device_type\u003d\u0027cdrom\u0027)"},{"line_number":830,"context_line":"        self.assertEqual(\u0027sata\u0027, bus)"},{"line_number":831,"context_line":""},{"line_number":832,"context_line":"    def test_get_disk_bus_for_device_type_cdrom_with_q35_image_meta(self):"},{"line_number":833,"context_line":"        instance \u003d objects.Instance(**self.test_instance)"},{"line_number":834,"context_line":"        image_meta \u003d {\u0027properties\u0027: {\u0027hw_machine_type\u0027: \u0027pc-q35-rhel8.0.0\u0027}}"},{"line_number":835,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(image_meta)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_b5d495be","line":832,"updated":"2019-06-07 21:17:08.000000000","message":"nit: could have made get_machine_type and get_arch non-callable mocks to prove they don\u0027t get hit. (But don\u0027t change that.)","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"35bc9887afad09f1032f29f4c5e8968cd887af21","unresolved":false,"context_lines":[{"line_number":830,"context_line":"        self.assertEqual(\u0027sata\u0027, bus)"},{"line_number":831,"context_line":""},{"line_number":832,"context_line":"    def test_get_disk_bus_for_device_type_cdrom_with_q35_image_meta(self):"},{"line_number":833,"context_line":"        instance \u003d objects.Instance(**self.test_instance)"},{"line_number":834,"context_line":"        image_meta \u003d {\u0027properties\u0027: {\u0027hw_machine_type\u0027: \u0027pc-q35-rhel8.0.0\u0027}}"},{"line_number":835,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(image_meta)"},{"line_number":836,"context_line":"        bus \u003d blockinfo.get_disk_bus_for_device_type(instance, \u0027kvm\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fb8cfa7_566f3efb","line":833,"updated":"2019-06-11 08:41:34.000000000","message":"nit: could maybe do with a check to make sure \u0027nova.virt.libvirt.utils.get_arch\u0027 wasn\u0027t called","commit_id":"9d6195dcdf7d200975b3208614285aabc608ef95"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abbf891e8e3c6f2b256a93b0be110583bee4b9ef","unresolved":false,"context_lines":[{"line_number":6248,"context_line":""},{"line_number":6249,"context_line":"        self.flags(virt_type\u003d\"kvm\","},{"line_number":6250,"context_line":"                   group\u003d\"libvirt\")"},{"line_number":6251,"context_line":"        mock_get_arch.return_value \u003d fields.Architecture.AARCH64"},{"line_number":6252,"context_line":"        instance_ref \u003d objects.Instance(**self.test_instance)"},{"line_number":6253,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":6254,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_0609c1db","line":6251,"range":{"start_line":6251,"start_character":0,"end_line":6251,"end_character":64},"updated":"2019-06-07 16:47:21.000000000","message":"This seems bogus.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6841b2690f673b7d8c0d1485389b7f3f24d70d04","unresolved":false,"context_lines":[{"line_number":6248,"context_line":""},{"line_number":6249,"context_line":"        self.flags(virt_type\u003d\"kvm\","},{"line_number":6250,"context_line":"                   group\u003d\"libvirt\")"},{"line_number":6251,"context_line":"        mock_get_arch.return_value \u003d fields.Architecture.AARCH64"},{"line_number":6252,"context_line":"        instance_ref \u003d objects.Instance(**self.test_instance)"},{"line_number":6253,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":6254,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_462a5990","line":6251,"range":{"start_line":6251,"start_character":0,"end_line":6251,"end_character":64},"in_reply_to":"9fb8cfa7_0609c1db","updated":"2019-06-07 17:12:11.000000000","message":"urgh, apologies no idea how that crept in.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abbf891e8e3c6f2b256a93b0be110583bee4b9ef","unresolved":false,"context_lines":[{"line_number":6256,"context_line":"                                            instance_ref,"},{"line_number":6257,"context_line":"                                            image_meta)"},{"line_number":6258,"context_line":""},{"line_number":6259,"context_line":"        mock_get_arch.return_value \u003d fields.Architecture.ARMV7"},{"line_number":6260,"context_line":"        self.stub_out(\u0027nova.virt.libvirt.host.Host.get_capabilities\u0027,"},{"line_number":6261,"context_line":"                      get_host_capabilities_stub)"},{"line_number":6262,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_a60f95df","line":6259,"range":{"start_line":6259,"start_character":0,"end_line":6259,"end_character":62},"updated":"2019-06-07 16:47:21.000000000","message":"Nit: could put this in the decorator.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6841b2690f673b7d8c0d1485389b7f3f24d70d04","unresolved":false,"context_lines":[{"line_number":6256,"context_line":"                                            instance_ref,"},{"line_number":6257,"context_line":"                                            image_meta)"},{"line_number":6258,"context_line":""},{"line_number":6259,"context_line":"        mock_get_arch.return_value \u003d fields.Architecture.ARMV7"},{"line_number":6260,"context_line":"        self.stub_out(\u0027nova.virt.libvirt.host.Host.get_capabilities\u0027,"},{"line_number":6261,"context_line":"                      get_host_capabilities_stub)"},{"line_number":6262,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_061ea16f","line":6259,"range":{"start_line":6259,"start_character":0,"end_line":6259,"end_character":62},"in_reply_to":"9fb8cfa7_a60f95df","updated":"2019-06-07 17:12:11.000000000","message":"Done","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abbf891e8e3c6f2b256a93b0be110583bee4b9ef","unresolved":false,"context_lines":[{"line_number":6264,"context_line":"        cfg \u003d drvr._get_guest_config(instance_ref,"},{"line_number":6265,"context_line":"                                     _fake_network_info(self, 1),"},{"line_number":6266,"context_line":"                                     image_meta, disk_info)"},{"line_number":6267,"context_line":"        self.assertEqual(cfg.os_mach_type, \"virt\")"},{"line_number":6268,"context_line":""},{"line_number":6269,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.utils.get_arch\u0027)"},{"line_number":6270,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_c6eac9aa","line":6267,"updated":"2019-06-07 16:47:21.000000000","message":"I tweaked this test case, putting mock_get_arch.return_value in the decorator and removing L6251, and it works fine.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ba31e9928c384a0181f55e033eb82e2727340f49","unresolved":false,"context_lines":[{"line_number":6272,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6273,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":6274,"context_line":"    def test_get_guest_config_aarch64(self, mock_path_exists,"},{"line_number":6275,"context_line":"                                      mock_numa, mock_storage, mock_get_arch):"},{"line_number":6276,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6277,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6278,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_2603a5ba","line":6275,"updated":"2019-06-07 16:31:39.000000000","message":"You don\u0027t appear to be using this mock anywhere, and get_capabilities is still mocked out. It may be passing, but is this test still doing what it\u0027s supposed to?","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"399f1ad09c5a2406b10298bbbd2b965ca6fa3d85","unresolved":false,"context_lines":[{"line_number":6272,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6273,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":6274,"context_line":"    def test_get_guest_config_aarch64(self, mock_path_exists,"},{"line_number":6275,"context_line":"                                      mock_numa, mock_storage, mock_get_arch):"},{"line_number":6276,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6277,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6278,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_0666a152","line":6275,"in_reply_to":"9fb8cfa7_062f81f6","updated":"2019-06-07 16:48:25.000000000","message":"Maybe a TODO?","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6841b2690f673b7d8c0d1485389b7f3f24d70d04","unresolved":false,"context_lines":[{"line_number":6272,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6273,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":6274,"context_line":"    def test_get_guest_config_aarch64(self, mock_path_exists,"},{"line_number":6275,"context_line":"                                      mock_numa, mock_storage, mock_get_arch):"},{"line_number":6276,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6277,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6278,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_c90c1a3d","line":6275,"in_reply_to":"9fb8cfa7_0666a152","updated":"2019-06-07 17:12:11.000000000","message":"*facepalm* I have no idea how but the random mock on 6251 was originally down here, I must\u0027ve fat fingered something before committing. I\u0027ll move this back down now.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abbf891e8e3c6f2b256a93b0be110583bee4b9ef","unresolved":false,"context_lines":[{"line_number":6272,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6273,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":6274,"context_line":"    def test_get_guest_config_aarch64(self, mock_path_exists,"},{"line_number":6275,"context_line":"                                      mock_numa, mock_storage, mock_get_arch):"},{"line_number":6276,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6277,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6278,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_e6c7cd11","line":6275,"in_reply_to":"9fb8cfa7_2603a5ba","updated":"2019-06-07 16:47:21.000000000","message":"If I remove the mock, the test fails.\n\n[Later] I uncovered an unrelated bug in the driver that\u0027s going to affect this path. Details forthcoming...","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ddb9ec6a1e90ab15f94f9ca21be0b1077a9bcdf5","unresolved":false,"context_lines":[{"line_number":6272,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6273,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":6274,"context_line":"    def test_get_guest_config_aarch64(self, mock_path_exists,"},{"line_number":6275,"context_line":"                                      mock_numa, mock_storage, mock_get_arch):"},{"line_number":6276,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6277,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6278,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_062f81f6","line":6275,"in_reply_to":"9fb8cfa7_2603a5ba","updated":"2019-06-07 16:44:01.000000000","message":"Yeah this caught me out initially, _has_uefi_support is using it and is called as part of this test [1][2][3]. As a follow up we could remove that and switch to libvirt_utils.get_arch but that\u0027s outside of the scope of this change.\n\n[1] https://github.com/openstack/nova/blob/729bf14892631644167b0df1da89107c34c0657f/nova/virt/libvirt/driver.py#L4973-L4979\n[2] https://github.com/openstack/nova/blob/729bf14892631644167b0df1da89107c34c0657f/nova/virt/libvirt/driver.py#L5032\n[3]\nhttps://github.com/openstack/nova/blob/729bf14892631644167b0df1da89107c34c0657f/nova/virt/libvirt/driver.py#L5381","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ba31e9928c384a0181f55e033eb82e2727340f49","unresolved":false,"context_lines":[{"line_number":6335,"context_line":"            caps.host \u003d vconfig.LibvirtConfigCapsHost()"},{"line_number":6336,"context_line":"            caps.host.cpu \u003d cpu"},{"line_number":6337,"context_line":"            return caps"},{"line_number":6338,"context_line":"        self.stub_out(\u0027nova.virt.libvirt.host.Host.get_capabilities\u0027,"},{"line_number":6339,"context_line":"                      get_host_capabilities_stub)"},{"line_number":6340,"context_line":"        self.flags(enabled\u003dTrue,"},{"line_number":6341,"context_line":"                   server_listen\u003d\u002710.0.0.1\u0027,"},{"line_number":6342,"context_line":"                   keymap\u003d\u0027en-ie\u0027,"},{"line_number":6343,"context_line":"                   group\u003d\u0027vnc\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_86e29100","line":6340,"range":{"start_line":6338,"start_character":0,"end_line":6340,"end_character":1},"updated":"2019-06-07 16:31:39.000000000","message":"As above: do we still need this?","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ddb9ec6a1e90ab15f94f9ca21be0b1077a9bcdf5","unresolved":false,"context_lines":[{"line_number":6335,"context_line":"            caps.host \u003d vconfig.LibvirtConfigCapsHost()"},{"line_number":6336,"context_line":"            caps.host.cpu \u003d cpu"},{"line_number":6337,"context_line":"            return caps"},{"line_number":6338,"context_line":"        self.stub_out(\u0027nova.virt.libvirt.host.Host.get_capabilities\u0027,"},{"line_number":6339,"context_line":"                      get_host_capabilities_stub)"},{"line_number":6340,"context_line":"        self.flags(enabled\u003dTrue,"},{"line_number":6341,"context_line":"                   server_listen\u003d\u002710.0.0.1\u0027,"},{"line_number":6342,"context_line":"                   keymap\u003d\u0027en-ie\u0027,"},{"line_number":6343,"context_line":"                   group\u003d\u0027vnc\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_a6355548","line":6340,"range":{"start_line":6338,"start_character":0,"end_line":6340,"end_character":1},"in_reply_to":"9fb8cfa7_86e29100","updated":"2019-06-07 16:44:01.000000000","message":"As above, it\u0027s still required.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"80d9fc54fa8595cb225f0868d7465bc02cd9a06e","unresolved":false,"context_lines":[{"line_number":6237,"context_line":"                       \"_get_guest_storage_config\")"},{"line_number":6238,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6239,"context_line":"    def test_get_guest_config_armv7(self, mock_numa, mock_storage,"},{"line_number":6240,"context_line":"                                    mock_get_arch):"},{"line_number":6241,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6242,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6243,"context_line":"            cpu.arch \u003d fields.Architecture.ARMV7"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_75d61dc6","line":6240,"range":{"start_line":6240,"start_character":36,"end_line":6240,"end_character":49},"updated":"2019-06-07 21:17:08.000000000","message":"nit: add call assertion for this, or use `new\u003dmock.Mock()` in the decorator and get rid of the unused param.\n\nLikewise below.","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3bc669863fb1b61a34434928cb5f4f7f5b7aeb5d","unresolved":false,"context_lines":[{"line_number":6273,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6274,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":6275,"context_line":"    def test_get_guest_config_aarch64(self, mock_path_exists,"},{"line_number":6276,"context_line":"                                      mock_numa, mock_storage, mock_get_arch):"},{"line_number":6277,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6278,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6279,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_fc50ba0c","line":6276,"updated":"2019-06-07 17:54:32.000000000","message":"Could still do with the TODO stating that the capabilities are needed for \u0027_has_uefi_support\u0027 and that that can be cleaned up in a follow-up [1]\n\n[1] https://review.opendev.org/#/c/663011/10/nova/tests/unit/virt/libvirt/test_driver.py@6275","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4795e61e7967892a055fdec962d04ab497e76be7","unresolved":false,"context_lines":[{"line_number":6273,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \"_has_numa_support\")"},{"line_number":6274,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":6275,"context_line":"    def test_get_guest_config_aarch64(self, mock_path_exists,"},{"line_number":6276,"context_line":"                                      mock_numa, mock_storage, mock_get_arch):"},{"line_number":6277,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6278,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6279,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_3ff9644c","line":6276,"in_reply_to":"9fb8cfa7_fc50ba0c","updated":"2019-06-07 19:19:13.000000000","message":"Started a fup under I5a91da6d8afd60286bd94e2915b9edb1c995a567 but it\u0027s getting slightly out of hand due to some things using get_caps and others using get_arch. I\u0027ll continue on Monday.","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"35bc9887afad09f1032f29f4c5e8968cd887af21","unresolved":false,"context_lines":[{"line_number":6329,"context_line":"    def test_get_guest_config_aarch64_with_graphics(self, mock_path_exists,"},{"line_number":6330,"context_line":"                                                    mock_numa, mock_storage,"},{"line_number":6331,"context_line":"                                                    mock_get_arch):"},{"line_number":6332,"context_line":"        def get_host_capabilities_stub(self):"},{"line_number":6333,"context_line":"            cpu \u003d vconfig.LibvirtConfigGuestCPU()"},{"line_number":6334,"context_line":"            cpu.arch \u003d fields.Architecture.AARCH64"},{"line_number":6335,"context_line":""},{"line_number":6336,"context_line":"            caps \u003d vconfig.LibvirtConfigCaps()"},{"line_number":6337,"context_line":"            caps.host \u003d vconfig.LibvirtConfigCapsHost()"},{"line_number":6338,"context_line":"            caps.host.cpu \u003d cpu"},{"line_number":6339,"context_line":"            return caps"},{"line_number":6340,"context_line":""},{"line_number":6341,"context_line":"        self.stub_out(\u0027nova.virt.libvirt.host.Host.get_capabilities\u0027,"},{"line_number":6342,"context_line":"                      get_host_capabilities_stub)"},{"line_number":6343,"context_line":"        self.flags(enabled\u003dTrue,"},{"line_number":6344,"context_line":"                   server_listen\u003d\u002710.0.0.1\u0027,"},{"line_number":6345,"context_line":"                   keymap\u003d\u0027en-ie\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fb8cfa7_36388aec","line":6342,"range":{"start_line":6332,"start_character":0,"end_line":6342,"end_character":49},"updated":"2019-06-11 08:41:34.000000000","message":"We still need to do this...","commit_id":"9d6195dcdf7d200975b3208614285aabc608ef95"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"35bc9887afad09f1032f29f4c5e8968cd887af21","unresolved":false,"context_lines":[{"line_number":6347,"context_line":"        self.flags(virt_type\u003d\u0027kvm\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":6348,"context_line":"        self.flags(enabled\u003dFalse, group\u003d\u0027spice\u0027)"},{"line_number":6349,"context_line":""},{"line_number":6350,"context_line":"        cfg \u003d self._get_guest_config_with_graphics()"},{"line_number":6351,"context_line":""},{"line_number":6352,"context_line":"        self.assertTrue(mock_path_exists.called)"},{"line_number":6353,"context_line":"        mock_path_exists.assert_called_with("}],"source_content_type":"text/x-python","patch_set":15,"id":"9fb8cfa7_162306bf","line":6350,"updated":"2019-06-11 08:41:34.000000000","message":"Because of this","commit_id":"9d6195dcdf7d200975b3208614285aabc608ef95"}],"nova/virt/libvirt/blockinfo.py":[{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cdfa039ecbf5c6c4489d0ae62b24a52a423d224","unresolved":false,"context_lines":[{"line_number":226,"context_line":"       Considering the currently configured virtualization"},{"line_number":227,"context_line":"       type, return the optimal disk_bus to use for a given"},{"line_number":228,"context_line":"       device type. For example, for a disk on KVM it will"},{"line_number":229,"context_line":"       return \u0027virtio\u0027, while for a CDROM it will return \u0027ide\u0027"},{"line_number":230,"context_line":"       on x86_64 and \u0027scsi\u0027 on ppc64."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"       Returns the disk_bus, or returns None if the device"},{"line_number":233,"context_line":"       type is not supported for this virtualization"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_401e0bbb","line":230,"range":{"start_line":229,"start_character":24,"end_line":230,"end_character":16},"updated":"2019-06-04 12:00:40.000000000","message":"This comment needs to be updated:\n\n   ... while for a CD-ROM, on x86_64, it will return \n   \u0027ide\u0027 for \"pc\" machine type and \u0027sata\u0027 for \"q35\" ...","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0432b405332f779b03fcc11f7f4586ccdb3d9894","unresolved":false,"context_lines":[{"line_number":226,"context_line":"       Considering the currently configured virtualization"},{"line_number":227,"context_line":"       type, return the optimal disk_bus to use for a given"},{"line_number":228,"context_line":"       device type. For example, for a disk on KVM it will"},{"line_number":229,"context_line":"       return \u0027virtio\u0027, while for a CDROM it will return \u0027ide\u0027"},{"line_number":230,"context_line":"       on x86_64 and \u0027scsi\u0027 on ppc64."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"       Returns the disk_bus, or returns None if the device"},{"line_number":233,"context_line":"       type is not supported for this virtualization"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_9b279265","line":230,"range":{"start_line":229,"start_character":24,"end_line":230,"end_character":16},"in_reply_to":"9fb8cfa7_401e0bbb","updated":"2019-06-04 12:22:43.000000000","message":"Done","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    if device_type \u003d\u003d \"disk\":"},{"line_number":238,"context_line":"        disk_bus \u003d osinfo.HardwareProperties(image_meta).disk_model"},{"line_number":239,"context_line":"    else:"},{"line_number":240,"context_line":"        key \u003d \"hw_\" + device_type + \"_bus\""},{"line_number":241,"context_line":"        disk_bus \u003d image_meta.properties.get(key)"},{"line_number":242,"context_line":"    if disk_bus is not None:"},{"line_number":243,"context_line":"        if not is_disk_bus_valid_for_virt(virt_type, disk_bus):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_60a22f9d","line":240,"range":{"start_line":240,"start_character":5,"end_line":240,"end_character":42},"updated":"2019-06-04 11:39:56.000000000","message":"the other way to fix this is to set hw_cdrom_bus\u003dsata in the image but i think what you have proposed is better","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"026172c3d2827d66d281396b79b10244a07b5d1b","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    if device_type \u003d\u003d \"disk\":"},{"line_number":238,"context_line":"        disk_bus \u003d osinfo.HardwareProperties(image_meta).disk_model"},{"line_number":239,"context_line":"    else:"},{"line_number":240,"context_line":"        key \u003d \"hw_\" + device_type + \"_bus\""},{"line_number":241,"context_line":"        disk_bus \u003d image_meta.properties.get(key)"},{"line_number":242,"context_line":"    if disk_bus is not None:"},{"line_number":243,"context_line":"        if not is_disk_bus_valid_for_virt(virt_type, disk_bus):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_b6394d42","line":240,"range":{"start_line":240,"start_character":5,"end_line":240,"end_character":42},"in_reply_to":"9fb8cfa7_3bf0e690","updated":"2019-06-04 13:22:10.000000000","message":"yep that is why i said i think what lee has proposed is better. you can work around it today but you should not have too.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"75a5d3c74560cf393b0a4556e5a4e826561cfcd8","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    if device_type \u003d\u003d \"disk\":"},{"line_number":238,"context_line":"        disk_bus \u003d osinfo.HardwareProperties(image_meta).disk_model"},{"line_number":239,"context_line":"    else:"},{"line_number":240,"context_line":"        key \u003d \"hw_\" + device_type + \"_bus\""},{"line_number":241,"context_line":"        disk_bus \u003d image_meta.properties.get(key)"},{"line_number":242,"context_line":"    if disk_bus is not None:"},{"line_number":243,"context_line":"        if not is_disk_bus_valid_for_virt(virt_type, disk_bus):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_3bf0e690","line":240,"range":{"start_line":240,"start_character":5,"end_line":240,"end_character":42},"in_reply_to":"9fb8cfa7_60a22f9d","updated":"2019-06-04 12:43:05.000000000","message":"We discussed that downstream, but it\u0027s not very user friendly if q35 is the default.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cdfa039ecbf5c6c4489d0ae62b24a52a423d224","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                    obj_fields.Architecture.S390X,"},{"line_number":270,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_60d0eff8","line":272,"range":{"start_line":272,"start_character":14,"end_line":272,"end_character":78},"updated":"2019-06-04 12:00:40.000000000","message":"Nit: Also, do tell what it _does_ provide.  Maybe:\n\n  The \u0027q35\u0027 machine type does not provide an IDE disk bus; \n  but it has an on-board SATA.  For a CD-ROM, \n  libvirt and QEMU upstream recommend to use SATA disk bus.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                    obj_fields.Architecture.S390X,"},{"line_number":270,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_4074cb35","line":272,"range":{"start_line":272,"start_character":10,"end_line":272,"end_character":79},"updated":"2019-06-04 11:39:56.000000000","message":"yep\ni remember discussing this in the past.\ni think this makes sense.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0432b405332f779b03fcc11f7f4586ccdb3d9894","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                    obj_fields.Architecture.S390X,"},{"line_number":270,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_1bf082c9","line":272,"range":{"start_line":272,"start_character":14,"end_line":272,"end_character":78},"in_reply_to":"9fb8cfa7_60d0eff8","updated":"2019-06-04 12:22:43.000000000","message":"I think that\u0027s pretty clear from the conditional tbh.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"},{"line_number":276,"context_line":"                return \"ide\""},{"line_number":277,"context_line":"        elif device_type \u003d\u003d \"disk\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_c0b67bda","line":274,"range":{"start_line":274,"start_character":22,"end_line":274,"end_character":29},"updated":"2019-06-04 11:39:56.000000000","message":"it is tempting to say we should default to virtio although that may have compatibility issue on windows.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"477f8575417ebeacb9762ec4e3f11e35dac74414","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"},{"line_number":276,"context_line":"                return \"ide\""},{"line_number":277,"context_line":"        elif device_type \u003d\u003d \"disk\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_f62ca59a","line":274,"range":{"start_line":274,"start_character":22,"end_line":274,"end_character":29},"in_reply_to":"9fb8cfa7_202e77a5","updated":"2019-06-04 12:58:56.000000000","message":"On \u0027virtio-scsi\u0027 vs. \u0027virtio-blk\u0027:\n\nYou got it the other way round—\u0027virtio-scsi\u0027 was designed to *replace* \u0027virtio-blk\u0027, which has non-trivial limitations, e.g. a guest with \u0027virito-blk\u0027 cannot handle more than 28 disks, as it\u0027ll run of PCI bus slots; or lack of full SCSI support.\n\nWhile a single\u0027virtio-scsi\u0027 device supports up to 16,383 LUNs (disks) per target and up to 255 targets.\n\nThe summary is that \u0027virtio-scsi\u0027 is generally preferred; consider \u0027virto-blk\u0027 for those workloads that are extremely sensitive to performance.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8085e12ef9bffc12abe720c316f5aee16f046ed","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"},{"line_number":276,"context_line":"                return \"ide\""},{"line_number":277,"context_line":"        elif device_type \u003d\u003d \"disk\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_e0c61f17","line":274,"range":{"start_line":274,"start_character":22,"end_line":274,"end_character":29},"in_reply_to":"9fb8cfa7_c0b67bda","updated":"2019-06-04 11:46:23.000000000","message":"Yeah indeed, otherwise I would\u0027ve gone with virtio-scsi.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cdfa039ecbf5c6c4489d0ae62b24a52a423d224","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"},{"line_number":276,"context_line":"                return \"ide\""},{"line_number":277,"context_line":"        elif device_type \u003d\u003d \"disk\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_402b6b93","line":274,"range":{"start_line":274,"start_character":22,"end_line":274,"end_character":29},"in_reply_to":"9fb8cfa7_e0c61f17","updated":"2019-06-04 12:00:40.000000000","message":"Not just that, \u0027virtio-scsi\u0027 requires drivers in the guest; if you guest has \u0027virtio-scsi\u0027 anyway, then using it for CD-ROM should be just fine.  But we should bear mind of a possible bootstrap issue: installing an OS from CD-ROM containing \u0027virtio-scsi\u0027 drivers might need a SATA CD-ROM.\n\nQ35 has an on-board SATA.  So it is the best decision in this case.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"fcc045fc99e2fa8e2c796f1fc2c00b213561edb0","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus."},{"line_number":273,"context_line":"            if \u0027q35\u0027 in libvirt_utils.get_machine_type(image_meta, host):"},{"line_number":274,"context_line":"                return \"sata\""},{"line_number":275,"context_line":"            else:"},{"line_number":276,"context_line":"                return \"ide\""},{"line_number":277,"context_line":"        elif device_type \u003d\u003d \"disk\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_202e77a5","line":274,"range":{"start_line":274,"start_character":22,"end_line":274,"end_character":29},"in_reply_to":"9fb8cfa7_e0c61f17","updated":"2019-06-04 12:01:04.000000000","message":"why \"virtio-scsi\" \"virtio\" which is virtio-blk is generally perfered over virtio-scsi but in any case sata is the sanest value to use","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cdfa039ecbf5c6c4489d0ae62b24a52a423d224","unresolved":false,"context_lines":[{"line_number":534,"context_line":"            disk_bus \u003d get_disk_bus_for_device_type(instance,"},{"line_number":535,"context_line":"                                                    virt_type,"},{"line_number":536,"context_line":"                                                    image_meta,"},{"line_number":537,"context_line":"                                                    host,"},{"line_number":538,"context_line":"                                                    device_type)"},{"line_number":539,"context_line":"            config_info \u003d get_next_disk_info(mapping,"},{"line_number":540,"context_line":"                                             disk_bus,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_2080b78b","line":537,"range":{"start_line":537,"start_character":52,"end_line":537,"end_character":56},"updated":"2019-06-04 12:00:40.000000000","message":"Can you please explain why we are passing around the \"host connection\"?","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0432b405332f779b03fcc11f7f4586ccdb3d9894","unresolved":false,"context_lines":[{"line_number":534,"context_line":"            disk_bus \u003d get_disk_bus_for_device_type(instance,"},{"line_number":535,"context_line":"                                                    virt_type,"},{"line_number":536,"context_line":"                                                    image_meta,"},{"line_number":537,"context_line":"                                                    host,"},{"line_number":538,"context_line":"                                                    device_type)"},{"line_number":539,"context_line":"            config_info \u003d get_next_disk_info(mapping,"},{"line_number":540,"context_line":"                                             disk_bus,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_7bcc1e89","line":537,"range":{"start_line":537,"start_character":52,"end_line":537,"end_character":56},"in_reply_to":"9fb8cfa7_2080b78b","updated":"2019-06-04 12:22:43.000000000","message":"https://review.opendev.org/#/c/663011/1/nova/virt/libvirt/utils.py@544 \n\nIt\u0027s used in the extracted get_machine_type to check the underlying host CPU arch.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4b1aa3101b604bb22edec0873dc7a528c8afc2a8","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                return \"scsi\""},{"line_number":272,"context_line":"            # NOTE(lyarwood): The q35 machine type does not provide an IDE bus"},{"line_number":273,"context_line":"            # and as a result we must default to SATA that is provided."},{"line_number":274,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta, host)"},{"line_number":275,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":276,"context_line":"                return \"sata\""},{"line_number":277,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_fe59d7fd","line":274,"range":{"start_line":274,"start_character":70,"end_line":274,"end_character":74},"updated":"2019-06-04 16:40:09.000000000","message":"This could as easily be host.get_capabilities(), which would simplify get_machine_type.","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"f8a3b6b1092fca0c70f422770b8f7e0e24886444","unresolved":false,"context_lines":[{"line_number":226,"context_line":"       Considering the currently configured virtualization type, return the"},{"line_number":227,"context_line":"       optimal disk_bus to use for a given device type. For example, for a disk"},{"line_number":228,"context_line":"       on KVM it will return \u0027virtio\u0027, while for a CDROM, it will return \u0027ide\u0027"},{"line_number":229,"context_line":"       for the \u0027pc\u0027 machine type, \u0027sata\u0027 for the \u0027q35\u0027 machine type and \u0027scsi\u0027"},{"line_number":230,"context_line":"       on ppc64."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"       Returns the disk_bus, or returns None if the device type is not"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_9112f708","line":229,"range":{"start_line":229,"start_character":7,"end_line":229,"end_character":67},"updated":"2019-06-05 16:59:31.000000000","message":"While updating it here, you removed the architecture, x86_64.  Please mention the architecture, too, if you\u0027re re-spinning.\n\nThat\u0027s why I was careful to mention \"on x86_64\" in my suggested phrasing: https://review.opendev.org/#/c/663011/1/nova/virt/libvirt/blockinfo.py@230","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e31572af5dc7ed0017c91182ac1d848fbd8dd219","unresolved":false,"context_lines":[{"line_number":226,"context_line":"       Considering the currently configured virtualization type, return the"},{"line_number":227,"context_line":"       optimal disk_bus to use for a given device type. For example, for a disk"},{"line_number":228,"context_line":"       on KVM it will return \u0027virtio\u0027, while for a CDROM, it will return \u0027ide\u0027"},{"line_number":229,"context_line":"       for the \u0027pc\u0027 machine type, \u0027sata\u0027 for the \u0027q35\u0027 machine type and \u0027scsi\u0027"},{"line_number":230,"context_line":"       on ppc64."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"       Returns the disk_bus, or returns None if the device type is not"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_224bbbb0","line":229,"range":{"start_line":229,"start_character":7,"end_line":229,"end_character":67},"in_reply_to":"9fb8cfa7_9112f708","updated":"2019-06-05 20:14:02.000000000","message":"ACK nice catch, thanks Kashyap.","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8af5ff7f1a442224bf8725d165c83c1cefa0b087","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            # and as a result we must default to SATA that is provided."},{"line_number":274,"context_line":"            caps \u003d host.get_capabilities()"},{"line_number":275,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta, caps)"},{"line_number":276,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":277,"context_line":"                return \"sata\""},{"line_number":278,"context_line":"            else:"},{"line_number":279,"context_line":"                return \"ide\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_ce08ceda","line":276,"range":{"start_line":276,"start_character":32,"end_line":276,"end_character":53},"updated":"2019-06-05 16:09:34.000000000","message":"Any reason we can\u0027t be specific about this machine type?","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"07cbb8e1d3b77f821c4dfe9e0d0faf40d394153f","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            # and as a result we must default to SATA that is provided."},{"line_number":274,"context_line":"            caps \u003d host.get_capabilities()"},{"line_number":275,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta, caps)"},{"line_number":276,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":277,"context_line":"                return \"sata\""},{"line_number":278,"context_line":"            else:"},{"line_number":279,"context_line":"                return \"ide\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_ee07d21b","line":276,"range":{"start_line":276,"start_character":32,"end_line":276,"end_character":53},"in_reply_to":"9fb8cfa7_4e729ee5","updated":"2019-06-05 16:47:10.000000000","message":"Just to note, the \"proliferation\" exists for both \u0027q35\u0027 and \u0027i440fx\u0027 (or \u0027pc\u0027).  With *each* QEMU release comes a new versioned machine type.  Why versioned machine types?  They preserve the guest ABI.\n\nAnd the bare \u0027q35\u0027 or \u0027pc\u0027 alias to their corresponding latest versioned machine type (as it can be seen from Lee\u0027s output).","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e6819d80df168eb4b89a046451bf4aafa7e6ea52","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            # and as a result we must default to SATA that is provided."},{"line_number":274,"context_line":"            caps \u003d host.get_capabilities()"},{"line_number":275,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta, caps)"},{"line_number":276,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":277,"context_line":"                return \"sata\""},{"line_number":278,"context_line":"            else:"},{"line_number":279,"context_line":"                return \"ide\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_4e729ee5","line":276,"range":{"start_line":276,"start_character":32,"end_line":276,"end_character":53},"in_reply_to":"9fb8cfa7_8ea2d64a","updated":"2019-06-05 16:34:59.000000000","message":"Ack. I\u0027m +1 on this, but if you have to respin could you add a comment about the proliferation of q35 types?","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3b18f4ce4c8f85e34e3bcacddce9078b2eea102c","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            # and as a result we must default to SATA that is provided."},{"line_number":274,"context_line":"            caps \u003d host.get_capabilities()"},{"line_number":275,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta, caps)"},{"line_number":276,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":277,"context_line":"                return \"sata\""},{"line_number":278,"context_line":"            else:"},{"line_number":279,"context_line":"                return \"ide\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_8ea2d64a","line":276,"range":{"start_line":276,"start_character":32,"end_line":276,"end_character":53},"in_reply_to":"9fb8cfa7_ce08ceda","updated":"2019-06-05 16:32:31.000000000","message":"As discussed, various versions of the Q35 machine type are defined by default within QEMU with even more downstream specific versions also available. We could enumerate all of them here but simply looking for \u0027q35\u0027 should be safe enough.\n\n$ qemu-system-x86_64 --machine help | grep q35\nq35                  Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-3.0)\npc-q35-3.0           Standard PC (Q35 + ICH9, 2009)\npc-q35-2.9           Standard PC (Q35 + ICH9, 2009)\npc-q35-2.8           Standard PC (Q35 + ICH9, 2009)\npc-q35-2.7           Standard PC (Q35 + ICH9, 2009)\npc-q35-2.6           Standard PC (Q35 + ICH9, 2009)\npc-q35-2.5           Standard PC (Q35 + ICH9, 2009)\npc-q35-2.4           Standard PC (Q35 + ICH9, 2009)\npc-q35-2.12          Standard PC (Q35 + ICH9, 2009)\npc-q35-2.11          Standard PC (Q35 + ICH9, 2009)\npc-q35-2.10          Standard PC (Q35 + ICH9, 2009)","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8c1e5bb1107f17897efb7e3feb0b6e960df7026c","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"def get_disk_bus_for_device_type(instance,"},{"line_number":220,"context_line":"                                 virt_type,"},{"line_number":221,"context_line":"                                 image_meta,"},{"line_number":222,"context_line":"                                 host,"},{"line_number":223,"context_line":"                                 device_type\u003d\"disk\"):"},{"line_number":224,"context_line":"    \"\"\"Determine the best disk bus to use for a device type."}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_94665329","line":221,"updated":"2019-06-06 13:59:17.000000000","message":"there\u0027s image_meta here and elsewhere, as needed by my comments at [1]\n\n[1] https://review.opendev.org/#/c/663011/8/nova/virt/libvirt/driver.py@a4342","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"094b0d2963287f59310225d67718f32954b3755b","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta, caps)"},{"line_number":274,"context_line":"            # NOTE(lyarwood): We can\u0027t be anymore explicit here as QEMU"},{"line_number":275,"context_line":"            # provides a version of the Q35 machine type per release."},{"line_number":276,"context_line":"            # Additionally downstream distributions can also provide their own."},{"line_number":277,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":278,"context_line":"                # NOTE(lyarwood): The Q35 machine type does not provide an IDE"},{"line_number":279,"context_line":"                # bus and as such we must use a SATA bus for cdroms."}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_cbcbc96f","line":276,"updated":"2019-06-06 15:33:36.000000000","message":"or any operator...","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8732f2c1ba1609e10f53c1e56a2837fb759dff83","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                                 device_type\u003d\"disk\"):"},{"line_number":223,"context_line":"    \"\"\"Determine the best disk bus to use for a device type."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"       Considering the currently configured virtualization type, return the"},{"line_number":226,"context_line":"       optimal disk_bus to use for a given device type. For example, for a disk"},{"line_number":227,"context_line":"       on KVM it will return \u0027virtio\u0027, while for a CDROM, it will return \u0027ide\u0027"},{"line_number":228,"context_line":"       for the \u0027pc\u0027 machine type on x86_64, \u0027sata\u0027 for the \u0027q35\u0027 machine type"},{"line_number":229,"context_line":"       on x86_64 and \u0027scsi\u0027 on ppc64."},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"       Returns the disk_bus, or returns None if the device type is not"},{"line_number":232,"context_line":"       supported for this virtualization"},{"line_number":233,"context_line":"    \"\"\""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    # Prefer a disk bus set against the image first of all"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_6be5fda7","line":232,"range":{"start_line":225,"start_character":0,"end_line":232,"end_character":40},"updated":"2019-06-06 15:22:30.000000000","message":"style nit: Can you dedent this since you\u0027re rewriting it?","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fe8fd08e0a51ebf9466e9b8cb572d9c3d18d8420","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                                 device_type\u003d\"disk\"):"},{"line_number":223,"context_line":"    \"\"\"Determine the best disk bus to use for a device type."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"       Considering the currently configured virtualization type, return the"},{"line_number":226,"context_line":"       optimal disk_bus to use for a given device type. For example, for a disk"},{"line_number":227,"context_line":"       on KVM it will return \u0027virtio\u0027, while for a CDROM, it will return \u0027ide\u0027"},{"line_number":228,"context_line":"       for the \u0027pc\u0027 machine type on x86_64, \u0027sata\u0027 for the \u0027q35\u0027 machine type"},{"line_number":229,"context_line":"       on x86_64 and \u0027scsi\u0027 on ppc64."},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"       Returns the disk_bus, or returns None if the device type is not"},{"line_number":232,"context_line":"       supported for this virtualization"},{"line_number":233,"context_line":"    \"\"\""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    # Prefer a disk bus set against the image first of all"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_4e3287a9","line":232,"range":{"start_line":225,"start_character":0,"end_line":232,"end_character":40},"in_reply_to":"9fb8cfa7_6be5fda7","updated":"2019-06-06 15:38:59.000000000","message":"Done","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"094b0d2963287f59310225d67718f32954b3755b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta)"},{"line_number":272,"context_line":"            # NOTE(lyarwood): We can\u0027t be anymore explicit here as QEMU"},{"line_number":273,"context_line":"            # provides a version of the Q35 machine type per release."},{"line_number":274,"context_line":"            # Additionally downstream distributions can also provide their own."},{"line_number":275,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":276,"context_line":"                # NOTE(lyarwood): The Q35 machine type does not provide an IDE"},{"line_number":277,"context_line":"                # bus and as such we must use a SATA bus for cdroms."}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_cec19782","line":274,"updated":"2019-06-06 15:33:36.000000000","message":"or any operator setting it","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abbf891e8e3c6f2b256a93b0be110583bee4b9ef","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":270,"context_line":"                return \"scsi\""},{"line_number":271,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta)"},{"line_number":272,"context_line":"            # NOTE(lyarwood): We can\u0027t be anymore explicit here as QEMU"},{"line_number":273,"context_line":"            # provides a version of the Q35 machine type per release."},{"line_number":274,"context_line":"            # Additionally downstream distributions can also provide their own."},{"line_number":275,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_522a1490","line":272,"range":{"start_line":272,"start_character":42,"end_line":272,"end_character":49},"updated":"2019-06-07 16:47:21.000000000","message":"any more","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6841b2690f673b7d8c0d1485389b7f3f24d70d04","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":270,"context_line":"                return \"scsi\""},{"line_number":271,"context_line":"            machine_type \u003d libvirt_utils.get_machine_type(image_meta)"},{"line_number":272,"context_line":"            # NOTE(lyarwood): We can\u0027t be anymore explicit here as QEMU"},{"line_number":273,"context_line":"            # provides a version of the Q35 machine type per release."},{"line_number":274,"context_line":"            # Additionally downstream distributions can also provide their own."},{"line_number":275,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_c95ada28","line":272,"range":{"start_line":272,"start_character":42,"end_line":272,"end_character":49},"in_reply_to":"9fb8cfa7_522a1490","updated":"2019-06-07 17:12:11.000000000","message":"Done","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2239b823608fdfcf40dc697082d590db69fc4feb","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            # NOTE(lyarwood): We can\u0027t be any more explicit here as QEMU"},{"line_number":273,"context_line":"            # provides a version of the Q35 machine type per release."},{"line_number":274,"context_line":"            # Additionally downstream distributions can also provide their own."},{"line_number":275,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":276,"context_line":"                # NOTE(lyarwood): The Q35 machine type does not provide an IDE"},{"line_number":277,"context_line":"                # bus and as such we must use a SATA bus for cdroms."},{"line_number":278,"context_line":"                return \"sata\""}],"source_content_type":"text/x-python","patch_set":17,"id":"9fb8cfa7_a4cde985","line":275,"range":{"start_line":275,"start_character":32,"end_line":275,"end_character":37},"updated":"2019-06-13 19:31:44.000000000","message":"Does case matter here? Could this be Q35 in the image meta?","commit_id":"527c452a6fc05a316eb8121796f761af97522772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e38d64b1c6da70c831591a272a5bfe8013bae3e6","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            # NOTE(lyarwood): We can\u0027t be any more explicit here as QEMU"},{"line_number":273,"context_line":"            # provides a version of the Q35 machine type per release."},{"line_number":274,"context_line":"            # Additionally downstream distributions can also provide their own."},{"line_number":275,"context_line":"            if machine_type and \u0027q35\u0027 in machine_type:"},{"line_number":276,"context_line":"                # NOTE(lyarwood): The Q35 machine type does not provide an IDE"},{"line_number":277,"context_line":"                # bus and as such we must use a SATA bus for cdroms."},{"line_number":278,"context_line":"                return \"sata\""}],"source_content_type":"text/x-python","patch_set":17,"id":"9fb8cfa7_e4b3e1e7","line":275,"range":{"start_line":275,"start_character":32,"end_line":275,"end_character":37},"in_reply_to":"9fb8cfa7_a4cde985","updated":"2019-06-13 19:38:21.000000000","message":"Looks like libvirt/qemu only says q35 so I guess this is OK:\n\nhttp://logs.openstack.org/11/663011/17/check/tempest-full-py3/6a826d2/controller/logs/screen-n-cpu.txt.gz#_Jun_12_22_24_13_577256","commit_id":"527c452a6fc05a316eb8121796f761af97522772"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4b1aa3101b604bb22edec0873dc7a528c8afc2a8","unresolved":false,"context_lines":[{"line_number":4999,"context_line":"                else:"},{"line_number":5000,"context_line":"                    raise exception.UEFINotSupported()"},{"line_number":5001,"context_line":"            guest.os_mach_type \u003d libvirt_utils.get_machine_type(image_meta,"},{"line_number":5002,"context_line":"                                                self._host, caps\u003dcaps)"},{"line_number":5003,"context_line":"            if image_meta.properties.get(\u0027hw_boot_menu\u0027) is None:"},{"line_number":5004,"context_line":"                guest.os_bootmenu \u003d strutils.bool_from_string("},{"line_number":5005,"context_line":"                    flavor.extra_specs.get(\u0027hw:boot_menu\u0027, \u0027no\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_3e844f5e","line":5002,"range":{"start_line":5002,"start_character":48,"end_line":5002,"end_character":58},"updated":"2019-06-04 16:40:09.000000000","message":"This argument is redundant here. See cleanup suggestion in libvirt.utils.","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8c1e5bb1107f17897efb7e3feb0b6e960df7026c","unresolved":false,"context_lines":[{"line_number":4339,"context_line":"            # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":4340,"context_line":"            # has decent RAM limits, etc."},{"line_number":4341,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.ARMV7,"},{"line_number":4342,"context_line":"                                      fields.Architecture.AARCH64):"},{"line_number":4343,"context_line":"                mach_type \u003d \"virt\""},{"line_number":4344,"context_line":""},{"line_number":4345,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.S390,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_94c173e7","side":"PARENT","line":4342,"updated":"2019-06-06 13:59:17.000000000","message":"Why does this function need to use caps for this? Couldn\u0027t we use \u0027libvirt_utils.get_arch\u0027 to retrieve it from image metadata instead? That avoids the need to pass caps all over the place, which would avoid most of the method signature changes","commit_id":"1da3c4c39980d9a8e918615f17c0ae26b4b6b501"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b9c5bab06db3340a178ea632a064a4d6d7a3a0d7","unresolved":false,"context_lines":[{"line_number":4339,"context_line":"            # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":4340,"context_line":"            # has decent RAM limits, etc."},{"line_number":4341,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.ARMV7,"},{"line_number":4342,"context_line":"                                      fields.Architecture.AARCH64):"},{"line_number":4343,"context_line":"                mach_type \u003d \"virt\""},{"line_number":4344,"context_line":""},{"line_number":4345,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.S390,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_afe6a243","side":"PARENT","line":4342,"in_reply_to":"9fb8cfa7_14090330","updated":"2019-06-06 14:09:51.000000000","message":"That\u0027s already here, see lines 4333 \u0026 4334. That\u0027s doing the very same thing first and returning if that\u0027s set. If it isn\u0027t we then use the hosts arch.","commit_id":"1da3c4c39980d9a8e918615f17c0ae26b4b6b501"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"93e79ce2e788501904d6c2e8f2a29cf5fc065d3b","unresolved":false,"context_lines":[{"line_number":4339,"context_line":"            # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":4340,"context_line":"            # has decent RAM limits, etc."},{"line_number":4341,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.ARMV7,"},{"line_number":4342,"context_line":"                                      fields.Architecture.AARCH64):"},{"line_number":4343,"context_line":"                mach_type \u003d \"virt\""},{"line_number":4344,"context_line":""},{"line_number":4345,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.S390,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_14090330","side":"PARENT","line":4342,"in_reply_to":"9fb8cfa7_94c173e7","updated":"2019-06-06 14:03:31.000000000","message":"Note that this is exactly what we do in the \u0027_is_s390x_guest\u0027 function here [1]. If inspecting imagemeta is good enough there, I don\u0027t see why it wouldn\u0027t be here.\n\n[1] https://review.opendev.org/#/c/663011/8/nova/virt/libvirt/driver.py@5061","commit_id":"1da3c4c39980d9a8e918615f17c0ae26b4b6b501"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5a3f945d9378fa9a51b1641a1dd284fb8ee405a6","unresolved":false,"context_lines":[{"line_number":4339,"context_line":"            # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":4340,"context_line":"            # has decent RAM limits, etc."},{"line_number":4341,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.ARMV7,"},{"line_number":4342,"context_line":"                                      fields.Architecture.AARCH64):"},{"line_number":4343,"context_line":"                mach_type \u003d \"virt\""},{"line_number":4344,"context_line":""},{"line_number":4345,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.S390,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_0f5b2e54","side":"PARENT","line":4342,"in_reply_to":"9fb8cfa7_afab021b","updated":"2019-06-06 14:34:46.000000000","message":"Missed the final case:\n\n \u003e 1. use the value from image_meta, else\n \u003e 2. use the value from nova.conf (provided via the \u0027get_default_machine_type\u0027),\n \u003e else\n \u003e 3. use one of the overridden values for ARM/S390X\n\n4. use None if none of the above match","commit_id":"1da3c4c39980d9a8e918615f17c0ae26b4b6b501"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1b2f999f1fd3a7193fa53053d5123573be62d14f","unresolved":false,"context_lines":[{"line_number":4339,"context_line":"            # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":4340,"context_line":"            # has decent RAM limits, etc."},{"line_number":4341,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.ARMV7,"},{"line_number":4342,"context_line":"                                      fields.Architecture.AARCH64):"},{"line_number":4343,"context_line":"                mach_type \u003d \"virt\""},{"line_number":4344,"context_line":""},{"line_number":4345,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.S390,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_afab021b","side":"PARENT","line":4342,"in_reply_to":"9fb8cfa7_afe6a243","updated":"2019-06-06 14:32:59.000000000","message":"Oh, indeed /o\\\n\nSo the logic is:\n\n1. use the value from image_meta, else\n2. use the value from nova.conf (provided via the \u0027get_default_machine_type\u0027), else\n3. use one of the overridden values for ARM/S390X\n\nWhat we need from caps though is the host CPU architecture (\u0027caps.host.cpu.arch\u0027). I see that the \u0027nova.objects.fields.Architecture.from_host\u0027 is available which would do this exact thing for us. However, I\u0027m not even  sure if this is correct since the guest could specify a different architecture via its image metadata and then the machine type we would generate would be wrong, no?\n\nShould we just be using \u0027libvirt_utils.get_arch\u0027 to get the architecture value needed here instead of parsing caps like this?","commit_id":"1da3c4c39980d9a8e918615f17c0ae26b4b6b501"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8c1e5bb1107f17897efb7e3feb0b6e960df7026c","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                             encryption\u003dencryption)"},{"line_number":1571,"context_line":"        disk_info \u003d blockinfo.get_info_from_bdm("},{"line_number":1572,"context_line":"            instance, CONF.libvirt.virt_type, instance.image_meta, bdm,"},{"line_number":1573,"context_line":"            self._host)"},{"line_number":1574,"context_line":"        if disk_info[\u0027bus\u0027] \u003d\u003d \u0027scsi\u0027:"},{"line_number":1575,"context_line":"            disk_info[\u0027unit\u0027] \u003d self._get_scsi_controller_max_unit(guest) + 1"},{"line_number":1576,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_d4ee0bb3","line":1573,"updated":"2019-06-06 13:59:17.000000000","message":"I really don\u0027t like that we\u0027re passing this outside of the class. It\u0027s private for a reason and I realize that we do pass it around (mostly to nova.virt.libvirt.guest.Guest.get_power_state), I\u0027m not sure why we consider that bad behavior.\n\nIs there any reason we need the full host object here instead of just the machine type? If not, I\u0027ve comments on the previous file","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"9bf1185398eb16620cfe33cc419d0fdd0d0eff40","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                             encryption\u003dencryption)"},{"line_number":1571,"context_line":"        disk_info \u003d blockinfo.get_info_from_bdm("},{"line_number":1572,"context_line":"            instance, CONF.libvirt.virt_type, instance.image_meta, bdm,"},{"line_number":1573,"context_line":"            self._host)"},{"line_number":1574,"context_line":"        if disk_info[\u0027bus\u0027] \u003d\u003d \u0027scsi\u0027:"},{"line_number":1575,"context_line":"            disk_info[\u0027unit\u0027] \u003d self._get_scsi_controller_max_unit(guest) + 1"},{"line_number":1576,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_ef125a58","line":1573,"in_reply_to":"9fb8cfa7_d4ee0bb3","updated":"2019-06-06 14:05:24.000000000","message":"https://review.opendev.org/#/c/663011/8/nova/virt/libvirt/blockinfo.py@272 is the reason we need _host in blockinfo, I didn\u0027t want to have to get_capabilities() everytime we wanted to call one of these higher blockinfo methods as it\u0027s only specifcally used when virt_type is in (\"qemu\", \"kvm\"), device is \"cdrom\" and the arch is X84_64.\n\nI couldn\u0027t think of a cleaner way around this without rewriting the entire blockinfo API.","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"81df8f76c588871a8e9ff3995c4644d1c4ecccfa","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"                             encryption\u003dencryption)"},{"line_number":1571,"context_line":"        disk_info \u003d blockinfo.get_info_from_bdm("},{"line_number":1572,"context_line":"            instance, CONF.libvirt.virt_type, instance.image_meta, bdm,"},{"line_number":1573,"context_line":"            self._host)"},{"line_number":1574,"context_line":"        if disk_info[\u0027bus\u0027] \u003d\u003d \u0027scsi\u0027:"},{"line_number":1575,"context_line":"            disk_info[\u0027unit\u0027] \u003d self._get_scsi_controller_max_unit(guest) + 1"},{"line_number":1576,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_2ff3920c","line":1573,"in_reply_to":"9fb8cfa7_ef125a58","updated":"2019-06-06 14:10:15.000000000","message":"Okay, if that\u0027s the case, then my comments at [1] are probably worth focusing on. I don\u0027t think \u0027_get_machine_type\u0027 (or the new libvirt_utils.get_machine_type) really needs access to caps.\n\n[1] https://review.opendev.org/#/c/663011/8/nova/virt/libvirt/driver.py@a4342","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"62521df0c9467e2bcf408372433ad47868f19103","unresolved":false,"context_lines":[{"line_number":4338,"context_line":"            # board, which is designed to be used with virtual machines."},{"line_number":4339,"context_line":"            # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":4340,"context_line":"            # has decent RAM limits, etc."},{"line_number":4341,"context_line":"            if caps.host.cpu.arch in (fields.Architecture.ARMV7,"},{"line_number":4342,"context_line":"                                      fields.Architecture.AARCH64):"},{"line_number":4343,"context_line":"                mach_type \u003d \"virt\""},{"line_number":4344,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_0ba32151","side":"PARENT","line":4341,"range":{"start_line":4341,"start_character":15,"end_line":4341,"end_character":33},"updated":"2019-06-06 15:23:03.000000000","message":"1. So really what we\u0027re saying here is that \u0027caps.host.cpu.arch\u0027, which is obtained from the libvirt config classes and basically comes down to the arch element in [1], is the same as...\n\n[1] https://libvirt.org/formatcaps.html#elementExamples","commit_id":"1da3c4c39980d9a8e918615f17c0ae26b4b6b501"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ba31e9928c384a0181f55e033eb82e2727340f49","unresolved":false,"context_lines":[{"line_number":4324,"context_line":""},{"line_number":4325,"context_line":"        return meta"},{"line_number":4326,"context_line":""},{"line_number":4327,"context_line":"    def _get_machine_type(self, image_meta, caps):"},{"line_number":4328,"context_line":"        # The guest machine type can be set as an image metadata"},{"line_number":4329,"context_line":"        # property, or otherwise based on architecture-specific"},{"line_number":4330,"context_line":"        # defaults."}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_d2a2844b","side":"PARENT","line":4327,"range":{"start_line":4327,"start_character":42,"end_line":4327,"end_character":48},"updated":"2019-06-07 16:31:39.000000000","message":"I was concerned about the change from using libvirt host capabilities to using uname. A change in reported architecture here would require a similar change in the hw_machine_type config variable, which would be a regression. Fortunately, however, they do not return different values. Libvirt canonicalises several host architectures:\n\nhttps://libvirt.org/git/?p\u003dlibvirt.git;a\u003dblob;f\u003dsrc/util/virarch.c;h\u003d3f5efde8e2037fbb34d855d77d1d9d5dcbb10ba9;hb\u003dHEAD#l158\n\nso, for eg, amd64 is reported as \u0027x86_64\u0027. Nova has long done the same set of transformations:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/fields.py#L176-L202\n\nIOW this change is a good simplification.","commit_id":"729bf14892631644167b0df1da89107c34c0657f"}],"nova/virt/libvirt/utils.py":[{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4cdfa039ecbf5c6c4489d0ae62b24a52a423d224","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return mode"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def get_machine_type(image_meta, host, caps\u003dNone):"},{"line_number":545,"context_line":"    # The guest machine type can be set as an image metadata"},{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_6076afdb","line":544,"range":{"start_line":544,"start_character":4,"end_line":544,"end_character":20},"updated":"2019-06-04 12:00:40.000000000","message":"Should we handle this moving around split out in a separate patch?  We\u0027re moving it _and_ modifying it along with other changes.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0432b405332f779b03fcc11f7f4586ccdb3d9894","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return mode"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def get_machine_type(image_meta, host, caps\u003dNone):"},{"line_number":545,"context_line":"    # The guest machine type can be set as an image metadata"},{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_fb8ece2c","line":544,"range":{"start_line":544,"start_character":4,"end_line":544,"end_character":20},"in_reply_to":"9fb8cfa7_6076afdb","updated":"2019-06-04 12:22:43.000000000","message":"I don\u0027t think so given this is likely going to be backported as a bugfix. I\u0027d rather keep the refactoring and fix in the same change.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"477f8575417ebeacb9762ec4e3f11e35dac74414","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return mode"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def get_machine_type(image_meta, host, caps\u003dNone):"},{"line_number":545,"context_line":"    # The guest machine type can be set as an image metadata"},{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_b6a94de0","line":544,"range":{"start_line":544,"start_character":4,"end_line":544,"end_character":20},"in_reply_to":"9fb8cfa7_fb8ece2c","updated":"2019-06-04 12:58:56.000000000","message":"Sure that\u0027s reasonable in this case. But please do spell it out in the commit message about the _two_ things involved in this change.\n\nIn general, \"backportability\" should not be the only reason (I know you\u0027re not saying as such) to split out patches.  Reference: https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":548,"context_line":"    mach_type \u003d None"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    if image_meta.properties.get(\u0027hw_machine_type\u0027) is not None:"},{"line_number":551,"context_line":"        mach_type \u003d image_meta.properties.hw_machine_type"},{"line_number":552,"context_line":"    elif host:"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027"},{"line_number":554,"context_line":"        # board as the default machine type.  It is the recommended"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_60f9cf7e","line":551,"range":{"start_line":551,"start_character":7,"end_line":551,"end_character":20},"updated":"2019-06-04 11:39:56.000000000","message":"return","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c8085e12ef9bffc12abe720c316f5aee16f046ed","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    if image_meta.properties.get(\u0027hw_machine_type\u0027) is not None:"},{"line_number":551,"context_line":"        mach_type \u003d image_meta.properties.hw_machine_type"},{"line_number":552,"context_line":"    elif host:"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027"},{"line_number":554,"context_line":"        # board as the default machine type.  It is the recommended"},{"line_number":555,"context_line":"        # board, which is designed to be used with virtual machines."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_00f57357","line":552,"range":{"start_line":552,"start_character":0,"end_line":552,"end_character":14},"updated":"2019-06-04 11:46:23.000000000","message":"I\u0027m not sure how this got in.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"fcc045fc99e2fa8e2c796f1fc2c00b213561edb0","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    if image_meta.properties.get(\u0027hw_machine_type\u0027) is not None:"},{"line_number":551,"context_line":"        mach_type \u003d image_meta.properties.hw_machine_type"},{"line_number":552,"context_line":"    elif host:"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027"},{"line_number":554,"context_line":"        # board as the default machine type.  It is the recommended"},{"line_number":555,"context_line":"        # board, which is designed to be used with virtual machines."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_4004cb17","line":552,"range":{"start_line":552,"start_character":0,"end_line":552,"end_character":14},"in_reply_to":"9fb8cfa7_00f57357","updated":"2019-06-04 12:01:04.000000000","message":"ya i was wondering about that but i assumed you had a reason.\ni guess this should just be else but its proably because of \n\ncaps \u003d host.get_capabilities()\n\non line 559","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0432b405332f779b03fcc11f7f4586ccdb3d9894","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    if image_meta.properties.get(\u0027hw_machine_type\u0027) is not None:"},{"line_number":551,"context_line":"        mach_type \u003d image_meta.properties.hw_machine_type"},{"line_number":552,"context_line":"    elif host:"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027"},{"line_number":554,"context_line":"        # board as the default machine type.  It is the recommended"},{"line_number":555,"context_line":"        # board, which is designed to be used with virtual machines."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_fb324ea7","line":552,"range":{"start_line":552,"start_character":0,"end_line":552,"end_character":14},"in_reply_to":"9fb8cfa7_4004cb17","updated":"2019-06-04 12:22:43.000000000","message":"Yeah I\u0027m going to drop this given host is passed by all callers, caps is the only optional arg.","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":559,"context_line":"            caps \u003d host.get_capabilities()"},{"line_number":560,"context_line":"        if caps.host.cpu.arch in (obj_fields.Architecture.ARMV7,"},{"line_number":561,"context_line":"                                  obj_fields.Architecture.AARCH64):"},{"line_number":562,"context_line":"            mach_type \u003d \"virt\""},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"        if caps.host.cpu.arch in (obj_fields.Architecture.S390,"},{"line_number":565,"context_line":"                                  obj_fields.Architecture.S390X):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_a034a74b","line":562,"range":{"start_line":562,"start_character":11,"end_line":562,"end_character":23},"updated":"2019-06-04 11:39:56.000000000","message":"return","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":561,"context_line":"                                  obj_fields.Architecture.AARCH64):"},{"line_number":562,"context_line":"            mach_type \u003d \"virt\""},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"        if caps.host.cpu.arch in (obj_fields.Architecture.S390,"},{"line_number":565,"context_line":"                                  obj_fields.Architecture.S390X):"},{"line_number":566,"context_line":"            mach_type \u003d \u0027s390-ccw-virtio\u0027"},{"line_number":567,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_803ba336","line":564,"range":{"start_line":564,"start_character":7,"end_line":564,"end_character":10},"updated":"2019-06-04 11:39:56.000000000","message":"elif","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"        if caps.host.cpu.arch in (obj_fields.Architecture.S390,"},{"line_number":565,"context_line":"                                  obj_fields.Architecture.S390X):"},{"line_number":566,"context_line":"            mach_type \u003d \u0027s390-ccw-virtio\u0027"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # If set in the config, use that as the default."},{"line_number":569,"context_line":"        mach_type \u003d ("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_2048b7ca","line":566,"range":{"start_line":566,"start_character":10,"end_line":566,"end_character":23},"updated":"2019-06-04 11:39:56.000000000","message":"return","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ef48e71af02b585959fb59ce713eafa3d27c6302","unresolved":false,"context_lines":[{"line_number":566,"context_line":"            mach_type \u003d \u0027s390-ccw-virtio\u0027"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # If set in the config, use that as the default."},{"line_number":569,"context_line":"        mach_type \u003d ("},{"line_number":570,"context_line":"            get_default_machine_type(caps.host.cpu.arch)"},{"line_number":571,"context_line":"            or mach_type"},{"line_number":572,"context_line":"        )"},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"    return mach_type"},{"line_number":575,"context_line":""},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"def machine_type_mappings():"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_202197fc","line":574,"range":{"start_line":569,"start_character":7,"end_line":574,"end_character":20},"updated":"2019-06-04 11:39:56.000000000","message":"return  get_default_machine_type(caps.host.cpu.arch)\n\nor \n\nelse:\n    return get_default_machine_type(caps.host.cpu.arch)","commit_id":"097b7f9a43da15d2e428cf55e0e4a517a9b2d2ef"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4b1aa3101b604bb22edec0873dc7a528c8afc2a8","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return mode"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def get_machine_type(image_meta, host, caps\u003dNone):"},{"line_number":545,"context_line":"    # The guest machine type can be set as an image metadata"},{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_7e1c076a","line":544,"updated":"2019-06-04 16:40:09.000000000","message":"This method has been cleaned up slightly in the move, removing mach_type. This is a non-functional change, and an improvement.","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4b1aa3101b604bb22edec0873dc7a528c8afc2a8","unresolved":false,"context_lines":[{"line_number":553,"context_line":"    # board, which is designed to be used with virtual machines."},{"line_number":554,"context_line":"    # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":555,"context_line":"    # has decent RAM limits, etc."},{"line_number":556,"context_line":"    if caps is None:"},{"line_number":557,"context_line":"        caps \u003d host.get_capabilities()"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    if caps.host.cpu.arch in (obj_fields.Architecture.ARMV7,"},{"line_number":560,"context_line":"                              obj_fields.Architecture.AARCH64):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_5e2d8393","line":557,"range":{"start_line":556,"start_character":0,"end_line":557,"end_character":38},"updated":"2019-06-04 16:40:09.000000000","message":"This is obviously new, and the source of the \u0027host\u0027 churn.\n\nSuggestion: leave the signature as it was (requiring caps). The caller either has caps already, or has the host object, in which case they can pass in caps instead. This would be cleaner.","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"87148154f160a8c1ff321459b125c59cd2d1ce13","unresolved":false,"context_lines":[{"line_number":553,"context_line":"    # board, which is designed to be used with virtual machines."},{"line_number":554,"context_line":"    # The \u0027virt\u0027 board is more flexible, supports PCI, \u0027virtio\u0027,"},{"line_number":555,"context_line":"    # has decent RAM limits, etc."},{"line_number":556,"context_line":"    if caps is None:"},{"line_number":557,"context_line":"        caps \u003d host.get_capabilities()"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    if caps.host.cpu.arch in (obj_fields.Architecture.ARMV7,"},{"line_number":560,"context_line":"                              obj_fields.Architecture.AARCH64):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_49362f06","line":557,"range":{"start_line":556,"start_character":0,"end_line":557,"end_character":38},"in_reply_to":"9fb8cfa7_5e2d8393","updated":"2019-06-04 18:06:53.000000000","message":"Done","commit_id":"8fb6d31aab946b9e90e217335beb7043d0adac50"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"8af5ff7f1a442224bf8725d165c83c1cefa0b087","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    return get_default_machine_type(caps.host.cpu.arch)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"def machine_type_mappings():"},{"line_number":569,"context_line":"    mappings \u003d {}"},{"line_number":570,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":571,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"},{"line_number":572,"context_line":"        if machine_type \u003d\u003d \u0027\u0027:"},{"line_number":573,"context_line":"            LOG.warning(\"Invalid hw_machine_type config value %s\", mapping)"},{"line_number":574,"context_line":"        else:"},{"line_number":575,"context_line":"            mappings[host_arch] \u003d machine_type"},{"line_number":576,"context_line":"    return mappings"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"def get_default_machine_type(arch):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_6e5a02f4","line":576,"range":{"start_line":568,"start_character":0,"end_line":576,"end_character":19},"updated":"2019-06-05 16:09:34.000000000","message":"Aside: we shouldn\u0027t be parsing this every time. Once is enough.","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"e31572af5dc7ed0017c91182ac1d848fbd8dd219","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    return get_default_machine_type(caps.host.cpu.arch)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"def machine_type_mappings():"},{"line_number":569,"context_line":"    mappings \u003d {}"},{"line_number":570,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":571,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"},{"line_number":572,"context_line":"        if machine_type \u003d\u003d \u0027\u0027:"},{"line_number":573,"context_line":"            LOG.warning(\"Invalid hw_machine_type config value %s\", mapping)"},{"line_number":574,"context_line":"        else:"},{"line_number":575,"context_line":"            mappings[host_arch] \u003d machine_type"},{"line_number":576,"context_line":"    return mappings"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"def get_default_machine_type(arch):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_e2f36372","line":576,"range":{"start_line":568,"start_character":0,"end_line":576,"end_character":19},"in_reply_to":"9fb8cfa7_6e5a02f4","updated":"2019-06-05 20:14:02.000000000","message":"Yeah but wouldn\u0027t caching this break SIGHUP config reloads? IIRC these are already broken but the fact that was once a thing has put me off optimisations like this in the past.","commit_id":"4d1f1f1a366567aa9d249f767ce9dd5a1be8bda6"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d50b9132215188c2a161392a2bc2e60fce90a9f2","unresolved":false,"context_lines":[{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."},{"line_number":548,"context_line":"    if image_meta.properties.get(\u0027hw_machine_type\u0027) is not None:"},{"line_number":549,"context_line":"        return image_meta.properties.hw_machine_type"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027"},{"line_number":552,"context_line":"    # board as the default machine type.  It is the recommended"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_b4ab571b","line":549,"updated":"2019-06-06 14:01:50.000000000","message":"this one\u0027s legit","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d50b9132215188c2a161392a2bc2e60fce90a9f2","unresolved":false,"context_lines":[{"line_number":555,"context_line":"    # has decent RAM limits, etc."},{"line_number":556,"context_line":"    if caps.host.cpu.arch in (obj_fields.Architecture.ARMV7,"},{"line_number":557,"context_line":"                              obj_fields.Architecture.AARCH64):"},{"line_number":558,"context_line":"        return \"virt\""},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    if caps.host.cpu.arch in (obj_fields.Architecture.S390,"},{"line_number":561,"context_line":"                              obj_fields.Architecture.S390X):"},{"line_number":562,"context_line":"        return \u0027s390-ccw-virtio\u0027"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    # If set in the config, use that as the default."},{"line_number":565,"context_line":"    return get_default_machine_type(caps.host.cpu.arch)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_f476afd8","line":562,"range":{"start_line":558,"start_character":0,"end_line":562,"end_character":32},"updated":"2019-06-06 14:01:50.000000000","message":"but these are now ignoring the config, which used to take precedence","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"db8541c3d8d7bea3c364ca113be429a00998d542","unresolved":false,"context_lines":[{"line_number":555,"context_line":"    # has decent RAM limits, etc."},{"line_number":556,"context_line":"    if caps.host.cpu.arch in (obj_fields.Architecture.ARMV7,"},{"line_number":557,"context_line":"                              obj_fields.Architecture.AARCH64):"},{"line_number":558,"context_line":"        return \"virt\""},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    if caps.host.cpu.arch in (obj_fields.Architecture.S390,"},{"line_number":561,"context_line":"                              obj_fields.Architecture.S390X):"},{"line_number":562,"context_line":"        return \u0027s390-ccw-virtio\u0027"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    # If set in the config, use that as the default."},{"line_number":565,"context_line":"    return get_default_machine_type(caps.host.cpu.arch)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fb8cfa7_6fbc2adc","line":562,"range":{"start_line":558,"start_character":0,"end_line":562,"end_character":32},"in_reply_to":"9fb8cfa7_f476afd8","updated":"2019-06-06 14:17:55.000000000","message":"ACK thanks Eric, I\u0027ll rework this now to keep the same behaviour.","commit_id":"5a201879717c6534a4d5a87cec9059afc925921f"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"62521df0c9467e2bcf408372433ad47868f19103","unresolved":false,"context_lines":[{"line_number":494,"context_line":"        if image_arch is not None:"},{"line_number":495,"context_line":"            return image_arch"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"    return obj_fields.Architecture.from_host()"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"def is_mounted(mount_path, source\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_8ba71150","line":497,"updated":"2019-06-06 15:23:03.000000000","message":"3. ... which means if there\u0027s no arch in the image props then it\u0027s grabbed from here, which comes down to...","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"62521df0c9467e2bcf408372433ad47868f19103","unresolved":false,"context_lines":[{"line_number":549,"context_line":"        return image_meta.properties.hw_machine_type"},{"line_number":550,"context_line":"    else:"},{"line_number":551,"context_line":"        machine_type \u003d None"},{"line_number":552,"context_line":"        arch \u003d get_arch(image_meta)"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027 board as the"},{"line_number":554,"context_line":"        # default machine type.  It is the recommended board, which is designed"},{"line_number":555,"context_line":"        # to be used with virtual machines.  The \u0027virt\u0027 board is more flexible,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_8b8e31ce","line":552,"updated":"2019-06-06 15:23:03.000000000","message":"2. ... is the same as calling get_arch() here...","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8732f2c1ba1609e10f53c1e56a2837fb759dff83","unresolved":false,"context_lines":[{"line_number":549,"context_line":"        return image_meta.properties.hw_machine_type"},{"line_number":550,"context_line":"    else:"},{"line_number":551,"context_line":"        machine_type \u003d None"},{"line_number":552,"context_line":"        arch \u003d get_arch(image_meta)"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027 board as the"},{"line_number":554,"context_line":"        # default machine type.  It is the recommended board, which is designed"},{"line_number":555,"context_line":"        # to be used with virtual machines.  The \u0027virt\u0027 board is more flexible,"},{"line_number":556,"context_line":"        # supports PCI, \u0027virtio\u0027, has decent RAM limits, etc."},{"line_number":557,"context_line":"        if arch in (obj_fields.Architecture.ARMV7,"},{"line_number":558,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":559,"context_line":"            machine_type \u003d \"virt\""},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        if arch in (obj_fields.Architecture.S390,"},{"line_number":562,"context_line":"                    obj_fields.Architecture.S390X):"},{"line_number":563,"context_line":"            machine_type \u003d \"s390-ccw-virtio\""},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # If set in the config, use that as the default."},{"line_number":566,"context_line":"        return get_default_machine_type(arch) or machine_type"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_ab2535c4","line":563,"range":{"start_line":552,"start_character":0,"end_line":563,"end_character":44},"updated":"2019-06-06 15:22:30.000000000","message":"I\u0027d really like it if we could move this to \u0027get_default_machine_type\u0027. In fact, I think there\u0027s _another_ bug here since we use this when building the instance [1] however we don\u0027t call this in the (currently) one other places that require the machine type [2]. Thoughts?\n\n[1] https://github.com/openstack/nova/blob/520fed1d91/nova/virt/libvirt/driver.py#L5044\n[2] https://github.com/openstack/nova/blob/520fed1d91/nova/virt/libvirt/host.py#L744","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fe8fd08e0a51ebf9466e9b8cb572d9c3d18d8420","unresolved":false,"context_lines":[{"line_number":549,"context_line":"        return image_meta.properties.hw_machine_type"},{"line_number":550,"context_line":"    else:"},{"line_number":551,"context_line":"        machine_type \u003d None"},{"line_number":552,"context_line":"        arch \u003d get_arch(image_meta)"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027 board as the"},{"line_number":554,"context_line":"        # default machine type.  It is the recommended board, which is designed"},{"line_number":555,"context_line":"        # to be used with virtual machines.  The \u0027virt\u0027 board is more flexible,"},{"line_number":556,"context_line":"        # supports PCI, \u0027virtio\u0027, has decent RAM limits, etc."},{"line_number":557,"context_line":"        if arch in (obj_fields.Architecture.ARMV7,"},{"line_number":558,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":559,"context_line":"            machine_type \u003d \"virt\""},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        if arch in (obj_fields.Architecture.S390,"},{"line_number":562,"context_line":"                    obj_fields.Architecture.S390X):"},{"line_number":563,"context_line":"            machine_type \u003d \"s390-ccw-virtio\""},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # If set in the config, use that as the default."},{"line_number":566,"context_line":"        return get_default_machine_type(arch) or machine_type"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_ee281b35","line":563,"range":{"start_line":552,"start_character":0,"end_line":563,"end_character":44},"in_reply_to":"9fb8cfa7_ab2535c4","updated":"2019-06-06 15:38:59.000000000","message":"Done","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8732f2c1ba1609e10f53c1e56a2837fb759dff83","unresolved":false,"context_lines":[{"line_number":548,"context_line":"    if image_meta.properties.get(\u0027hw_machine_type\u0027) is not None:"},{"line_number":549,"context_line":"        return image_meta.properties.hw_machine_type"},{"line_number":550,"context_line":"    else:"},{"line_number":551,"context_line":"        machine_type \u003d None"},{"line_number":552,"context_line":"        arch \u003d get_arch(image_meta)"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027 board as the"},{"line_number":554,"context_line":"        # default machine type.  It is the recommended board, which is designed"},{"line_number":555,"context_line":"        # to be used with virtual machines.  The \u0027virt\u0027 board is more flexible,"},{"line_number":556,"context_line":"        # supports PCI, \u0027virtio\u0027, has decent RAM limits, etc."},{"line_number":557,"context_line":"        if arch in (obj_fields.Architecture.ARMV7,"},{"line_number":558,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":559,"context_line":"            machine_type \u003d \"virt\""},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        if arch in (obj_fields.Architecture.S390,"},{"line_number":562,"context_line":"                    obj_fields.Architecture.S390X):"},{"line_number":563,"context_line":"            machine_type \u003d \"s390-ccw-virtio\""},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # If set in the config, use that as the default."},{"line_number":566,"context_line":"        return get_default_machine_type(arch) or machine_type"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"def machine_type_mappings():"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_6b497dce","line":566,"range":{"start_line":551,"start_character":0,"end_line":566,"end_character":61},"updated":"2019-06-06 15:22:30.000000000","message":"style nit: this whole thing can be dedented and the \u0027else:\u0027 removed","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fe8fd08e0a51ebf9466e9b8cb572d9c3d18d8420","unresolved":false,"context_lines":[{"line_number":548,"context_line":"    if image_meta.properties.get(\u0027hw_machine_type\u0027) is not None:"},{"line_number":549,"context_line":"        return image_meta.properties.hw_machine_type"},{"line_number":550,"context_line":"    else:"},{"line_number":551,"context_line":"        machine_type \u003d None"},{"line_number":552,"context_line":"        arch \u003d get_arch(image_meta)"},{"line_number":553,"context_line":"        # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027 board as the"},{"line_number":554,"context_line":"        # default machine type.  It is the recommended board, which is designed"},{"line_number":555,"context_line":"        # to be used with virtual machines.  The \u0027virt\u0027 board is more flexible,"},{"line_number":556,"context_line":"        # supports PCI, \u0027virtio\u0027, has decent RAM limits, etc."},{"line_number":557,"context_line":"        if arch in (obj_fields.Architecture.ARMV7,"},{"line_number":558,"context_line":"                    obj_fields.Architecture.AARCH64):"},{"line_number":559,"context_line":"            machine_type \u003d \"virt\""},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        if arch in (obj_fields.Architecture.S390,"},{"line_number":562,"context_line":"                    obj_fields.Architecture.S390X):"},{"line_number":563,"context_line":"            machine_type \u003d \"s390-ccw-virtio\""},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # If set in the config, use that as the default."},{"line_number":566,"context_line":"        return get_default_machine_type(arch) or machine_type"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"def machine_type_mappings():"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_ce1d1710","line":566,"range":{"start_line":551,"start_character":0,"end_line":566,"end_character":61},"in_reply_to":"9fb8cfa7_6b497dce","updated":"2019-06-06 15:38:59.000000000","message":"Done","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8732f2c1ba1609e10f53c1e56a2837fb759dff83","unresolved":false,"context_lines":[{"line_number":568,"context_line":""},{"line_number":569,"context_line":"def machine_type_mappings():"},{"line_number":570,"context_line":"    mappings \u003d {}"},{"line_number":571,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":572,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"},{"line_number":573,"context_line":"        if machine_type \u003d\u003d \u0027\u0027:"},{"line_number":574,"context_line":"            LOG.warning(\"Invalid hw_machine_type config value %s\", mapping)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fb8cfa7_4b7d99e5","line":571,"range":{"start_line":571,"start_character":51,"end_line":571,"end_character":53},"updated":"2019-06-06 15:22:30.000000000","message":"Unrelated but this is wrong. It should be an empty list or, better, the config option should have a default of \u0027[]\u0027","commit_id":"09050eae3739b78fcb48e8e05446e9a7072acb05"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abbf891e8e3c6f2b256a93b0be110583bee4b9ef","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"9fb8cfa7_4631f9eb","updated":"2019-06-07 16:47:21.000000000","message":"This is SO much nicer, ++","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ba31e9928c384a0181f55e033eb82e2727340f49","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return mode"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def get_machine_type(image_meta):"},{"line_number":545,"context_line":"    # The guest machine type can be set as an image metadata"},{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_5203f40f","line":544,"updated":"2019-06-07 16:31:39.000000000","message":"Suggestion: In the case where your deployment tooling hasn\u0027t set this for you automatically, this is probably going to be None. I wonder if it\u0027s worth commenting here for maintainers that None is going to eventually be translated to whatever the QEMU default is, which is currently \u0027pc\u0027.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"399f1ad09c5a2406b10298bbbd2b965ca6fa3d85","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return mode"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def get_machine_type(image_meta):"},{"line_number":545,"context_line":"    # The guest machine type can be set as an image metadata"},{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_a6ea3572","line":544,"in_reply_to":"9fb8cfa7_5203f40f","updated":"2019-06-07 16:48:25.000000000","message":"Good call. Docstrings ftw","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6841b2690f673b7d8c0d1485389b7f3f24d70d04","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return mode"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def get_machine_type(image_meta):"},{"line_number":545,"context_line":"    # The guest machine type can be set as an image metadata"},{"line_number":546,"context_line":"    # property, or otherwise based on architecture-specific"},{"line_number":547,"context_line":"    # defaults."}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_c9441a1e","line":544,"in_reply_to":"9fb8cfa7_a6ea3572","updated":"2019-06-07 17:12:11.000000000","message":"Done","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ba31e9928c384a0181f55e033eb82e2727340f49","unresolved":false,"context_lines":[{"line_number":552,"context_line":"    return get_default_machine_type(get_arch(image_meta))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"def machine_type_mappings():"},{"line_number":556,"context_line":"    mappings \u003d {}"},{"line_number":557,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":558,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_86d8517f","line":555,"updated":"2019-06-07 16:31:39.000000000","message":"nit: Only 1 caller.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6841b2690f673b7d8c0d1485389b7f3f24d70d04","unresolved":false,"context_lines":[{"line_number":552,"context_line":"    return get_default_machine_type(get_arch(image_meta))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"def machine_type_mappings():"},{"line_number":556,"context_line":"    mappings \u003d {}"},{"line_number":557,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":558,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_2955b6c6","line":555,"in_reply_to":"9fb8cfa7_46e01997","updated":"2019-06-07 17:12:11.000000000","message":"I\u0027ll do this in an fup.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"399f1ad09c5a2406b10298bbbd2b965ca6fa3d85","unresolved":false,"context_lines":[{"line_number":552,"context_line":"    return get_default_machine_type(get_arch(image_meta))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"def machine_type_mappings():"},{"line_number":556,"context_line":"    mappings \u003d {}"},{"line_number":557,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":558,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_46e01997","line":555,"in_reply_to":"9fb8cfa7_86d8517f","updated":"2019-06-07 16:48:25.000000000","message":"Yeah, this could be inlined, for sure. Sounds like another good TODO","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"ba31e9928c384a0181f55e033eb82e2727340f49","unresolved":false,"context_lines":[{"line_number":563,"context_line":"    return mappings"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":""},{"line_number":566,"context_line":"def get_default_machine_type(arch):"},{"line_number":567,"context_line":"    machine_type \u003d None"},{"line_number":568,"context_line":"    # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027 board as the"},{"line_number":569,"context_line":"    # default machine type.  It is the recommended board, which is designed"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_86aa91cf","line":566,"updated":"2019-06-07 16:31:39.000000000","message":"nit: this has only 1 caller: get_machine_type(). You could give it a _ prefix, or it\u0027s even small enough to inline it.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ddb9ec6a1e90ab15f94f9ca21be0b1077a9bcdf5","unresolved":false,"context_lines":[{"line_number":563,"context_line":"    return mappings"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":""},{"line_number":566,"context_line":"def get_default_machine_type(arch):"},{"line_number":567,"context_line":"    machine_type \u003d None"},{"line_number":568,"context_line":"    # NOTE(kchamart): For ARMv7 and AArch64, use the \u0027virt\u0027 board as the"},{"line_number":569,"context_line":"    # default machine type.  It is the recommended board, which is designed"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_6628bde1","line":566,"in_reply_to":"9fb8cfa7_86aa91cf","updated":"2019-06-07 16:44:01.000000000","message":"It has two, the above and also...\n\nhttps://github.com/openstack/nova/blob/729bf14892631644167b0df1da89107c34c0657f/nova/virt/libvirt/host.py#L743-L744","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abbf891e8e3c6f2b256a93b0be110583bee4b9ef","unresolved":false,"context_lines":[{"line_number":576,"context_line":"    if arch in (obj_fields.Architecture.S390,"},{"line_number":577,"context_line":"                obj_fields.Architecture.S390X):"},{"line_number":578,"context_line":"        machine_type \u003d \"s390-ccw-virtio\""},{"line_number":579,"context_line":"    return machine_type_mappings().get(arch) or machine_type"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"def mdev_name2uuid(mdev_name):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_c673a9b0","line":579,"updated":"2019-06-07 16:47:21.000000000","message":"This could be even more explicit by putting\n\n # Config takes precedence\n machine_type \u003d machine_type_mappings().get(arch)\n if machine_type:\n     return machine_type\n\nat the top.","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6841b2690f673b7d8c0d1485389b7f3f24d70d04","unresolved":false,"context_lines":[{"line_number":576,"context_line":"    if arch in (obj_fields.Architecture.S390,"},{"line_number":577,"context_line":"                obj_fields.Architecture.S390X):"},{"line_number":578,"context_line":"        machine_type \u003d \"s390-ccw-virtio\""},{"line_number":579,"context_line":"    return machine_type_mappings().get(arch) or machine_type"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"def mdev_name2uuid(mdev_name):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_09d6b250","line":579,"in_reply_to":"9fb8cfa7_c673a9b0","updated":"2019-06-07 17:12:11.000000000","message":"Done","commit_id":"ec192e09a98e759dba61ef49cde135c0b9392111"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3bc669863fb1b61a34434928cb5f4f7f5b7aeb5d","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    return get_default_machine_type(get_arch(image_meta))"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"def machine_type_mappings():"},{"line_number":558,"context_line":"    mappings \u003d {}"},{"line_number":559,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":560,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_5c41c638","line":557,"updated":"2019-06-07 17:54:32.000000000","message":"Could do with a TODO here\n\nLater: I see you plan to do a follow-up. nvm","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4795e61e7967892a055fdec962d04ab497e76be7","unresolved":false,"context_lines":[{"line_number":554,"context_line":"    return get_default_machine_type(get_arch(image_meta))"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"def machine_type_mappings():"},{"line_number":558,"context_line":"    mappings \u003d {}"},{"line_number":559,"context_line":"    for mapping in CONF.libvirt.hw_machine_type or {}:"},{"line_number":560,"context_line":"        host_arch, _, machine_type \u003d mapping.partition(\u0027\u003d\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_5f89b8c7","line":557,"in_reply_to":"9fb8cfa7_5c41c638","updated":"2019-06-07 19:19:13.000000000","message":"Posted a fup under I29c7a96ca858e8941744b1a931863b908522fc4a that I\u0027ll rebase under the DNM change once that\u0027s had a chance to pass over the weekend.","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"80d9fc54fa8595cb225f0868d7465bc02cd9a06e","unresolved":false,"context_lines":[{"line_number":582,"context_line":"    if arch in (obj_fields.Architecture.S390,"},{"line_number":583,"context_line":"                obj_fields.Architecture.S390X):"},{"line_number":584,"context_line":"        return \"s390-ccw-virtio\""},{"line_number":585,"context_line":"    return None"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"def mdev_name2uuid(mdev_name):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_d5f0296a","line":585,"updated":"2019-06-07 21:17:08.000000000","message":"nice","commit_id":"c0a0a88575c29d6c826e232c3c8571730151ff14"}]}
