)]}'
{"nova/tests/functional/integrated_helpers.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5fe9d63bb415084e7d3826ee979afb4448f7c1cf","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        fake_notifier.wait_for_versioned_notifications(\u0027instance.reboot.end\u0027)"},{"line_number":414,"context_line":"        return self._wait_for_state_change(server, expected_state)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _attach_interface(self, server, port_uuid):"},{"line_number":417,"context_line":"        \"\"\"attach a neutron port to a server.\"\"\""},{"line_number":418,"context_line":"        body \u003d {"},{"line_number":419,"context_line":"            \"interfaceAttachment\": {"},{"line_number":420,"context_line":"                \"port_id\": port_uuid"},{"line_number":421,"context_line":"            }"},{"line_number":422,"context_line":"        }"},{"line_number":423,"context_line":"        attachment \u003d self.api.attach_interface(server[\u0027id\u0027], body)"},{"line_number":424,"context_line":"        fake_notifier.wait_for_versioned_notifications("},{"line_number":425,"context_line":"            \u0027instance.interface_attach.end\u0027)"},{"line_number":426,"context_line":"        return attachment"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"    def _detach_interface(self, server, port_uuid):"},{"line_number":429,"context_line":"        \"\"\"detach a neutron port form a server.\"\"\""},{"line_number":430,"context_line":"        self.api.detach_interface(server[\u0027id\u0027], port_uuid)"},{"line_number":431,"context_line":"        fake_notifier.wait_for_versioned_notifications("},{"line_number":432,"context_line":"            \u0027instance.interface_detach.end\u0027)"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def _rebuild_server(self, server, image_uuid, expected_state\u003d\u0027ACTIVE\u0027):"},{"line_number":435,"context_line":"        \"\"\"Rebuild a server.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"d4f56dd5_86327085","line":432,"range":{"start_line":416,"start_character":0,"end_line":432,"end_character":44},"updated":"2021-03-16 15:15:51.000000000","message":"I\u0027m amazed we didn\u0027t have these already.","commit_id":"e0d5781e79b749da27f9fce5c65a65353e3c9bc0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b85d3f0300c39462b76211c9a14160a62713f429","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        fake_notifier.wait_for_versioned_notifications(\u0027instance.reboot.end\u0027)"},{"line_number":414,"context_line":"        return self._wait_for_state_change(server, expected_state)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _attach_interface(self, server, port_uuid):"},{"line_number":417,"context_line":"        \"\"\"attach a neutron port to a server.\"\"\""},{"line_number":418,"context_line":"        body \u003d {"},{"line_number":419,"context_line":"            \"interfaceAttachment\": {"},{"line_number":420,"context_line":"                \"port_id\": port_uuid"},{"line_number":421,"context_line":"            }"},{"line_number":422,"context_line":"        }"},{"line_number":423,"context_line":"        attachment \u003d self.api.attach_interface(server[\u0027id\u0027], body)"},{"line_number":424,"context_line":"        fake_notifier.wait_for_versioned_notifications("},{"line_number":425,"context_line":"            \u0027instance.interface_attach.end\u0027)"},{"line_number":426,"context_line":"        return attachment"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"    def _detach_interface(self, server, port_uuid):"},{"line_number":429,"context_line":"        \"\"\"detach a neutron port form a server.\"\"\""},{"line_number":430,"context_line":"        self.api.detach_interface(server[\u0027id\u0027], port_uuid)"},{"line_number":431,"context_line":"        fake_notifier.wait_for_versioned_notifications("},{"line_number":432,"context_line":"            \u0027instance.interface_detach.end\u0027)"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def _rebuild_server(self, server, image_uuid, expected_state\u003d\u0027ACTIVE\u0027):"},{"line_number":435,"context_line":"        \"\"\"Rebuild a server.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"f94d5569_5e5d5e99","line":432,"range":{"start_line":416,"start_character":0,"end_line":432,"end_character":44},"in_reply_to":"d4f56dd5_86327085","updated":"2021-03-16 16:56:47.000000000","message":"yeah we have a lot of direct api.attach_interface calls in the func test instead","commit_id":"e0d5781e79b749da27f9fce5c65a65353e3c9bc0"}],"nova/tests/functional/libvirt/test_pci_sriov_servers.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"19404580a9cdf379d01ea0aa544432deb860b6c8","unresolved":true,"context_lines":[{"line_number":733,"context_line":"                vend_name\u003d\u0027Mellanox Technologies\u0027,"},{"line_number":734,"context_line":"                prod_id\u003d\u0027101e\u0027,"},{"line_number":735,"context_line":"                prod_name\u003d\u0027ConnectX Family mlx5Gen Virtual Function\u0027)"},{"line_number":736,"context_line":"            vdpa_info.add_device(f\u0027vdpa_vdpa{idx}\u0027, idx, vf)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"        orig_create \u003d nova.virt.libvirt.guest.Guest.create"},{"line_number":739,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fdd4391_7bc415d9","line":736,"updated":"2021-03-12 09:58:24.000000000","message":"Is this the correct view in a real hardware as well? So both the VF and the vdpa device is returned by libvirt?","commit_id":"de7e0c4e8836f52707b905c42df41f09974a84af"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1c4d355f05de306d7df6331cb862e0933d6e3456","unresolved":false,"context_lines":[{"line_number":733,"context_line":"                vend_name\u003d\u0027Mellanox Technologies\u0027,"},{"line_number":734,"context_line":"                prod_id\u003d\u0027101e\u0027,"},{"line_number":735,"context_line":"                prod_name\u003d\u0027ConnectX Family mlx5Gen Virtual Function\u0027)"},{"line_number":736,"context_line":"            vdpa_info.add_device(f\u0027vdpa_vdpa{idx}\u0027, idx, vf)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"        orig_create \u003d nova.virt.libvirt.guest.Guest.create"},{"line_number":739,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"6e7db0ed_55224daf","line":736,"in_reply_to":"3fdd4391_7bc415d9","updated":"2021-03-12 17:24:22.000000000","message":"Yup, I\u0027ve included a dump of the output here [1]. Let me know if you want more info.\n\n[1] http://paste.openstack.org/show/803522/","commit_id":"de7e0c4e8836f52707b905c42df41f09974a84af"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1636797bf11d752003c03ad3212f8d40a35c7743","unresolved":false,"context_lines":[{"line_number":733,"context_line":"                vend_name\u003d\u0027Mellanox Technologies\u0027,"},{"line_number":734,"context_line":"                prod_id\u003d\u0027101e\u0027,"},{"line_number":735,"context_line":"                prod_name\u003d\u0027ConnectX Family mlx5Gen Virtual Function\u0027)"},{"line_number":736,"context_line":"            vdpa_info.add_device(f\u0027vdpa_vdpa{idx}\u0027, idx, vf)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"        orig_create \u003d nova.virt.libvirt.guest.Guest.create"},{"line_number":739,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9d7c9cc1_7b4c179b","line":736,"in_reply_to":"6e7db0ed_55224daf","updated":"2021-03-12 19:15:34.000000000","message":"thanks!","commit_id":"de7e0c4e8836f52707b905c42df41f09974a84af"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"37cd849c60f43e23633c77955819166b767515fe","unresolved":true,"context_lines":[{"line_number":720,"context_line":"            vf_ratio\u003dvf_ratio,"},{"line_number":721,"context_line":"            vend_id\u003d\u002715b3\u0027,"},{"line_number":722,"context_line":"            vend_name\u003d\u0027Mellanox Technologies\u0027,"},{"line_number":723,"context_line":"            prod_id\u003d\u0027101d\u0027,"},{"line_number":724,"context_line":"            prod_name\u003d\u0027MT2892 Family [ConnectX-6 Dx]\u0027)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        for idx in range(num_vfs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"6caca919_52407f6a","line":723,"updated":"2021-03-12 15:50:26.000000000","message":"I assumed that when I change this to 101e then the PF is also whitelisted and then the test can prove that the PF becomes unclaimable after one vdpa is claimed under it. However changing the product id to match the whitelist does not make the PF whitelisted. I guess it is just a fakelibvirt limitation.","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1c4d355f05de306d7df6331cb862e0933d6e3456","unresolved":false,"context_lines":[{"line_number":720,"context_line":"            vf_ratio\u003dvf_ratio,"},{"line_number":721,"context_line":"            vend_id\u003d\u002715b3\u0027,"},{"line_number":722,"context_line":"            vend_name\u003d\u0027Mellanox Technologies\u0027,"},{"line_number":723,"context_line":"            prod_id\u003d\u0027101d\u0027,"},{"line_number":724,"context_line":"            prod_name\u003d\u0027MT2892 Family [ConnectX-6 Dx]\u0027)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        for idx in range(num_vfs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"b6766dc9_041a8dcf","line":723,"in_reply_to":"6caca919_52407f6a","updated":"2021-03-12 17:24:22.000000000","message":"I\u0027m not sure what you meant by \"not whitelisted\", but we have a check in \u0027nova/pci/stats.py\u0027 to filter out PFs when we didn\u0027t request them (by specifying the \u0027device_type\u0027 attribute of the PCI alias [1]). I did expand the whitelist to include the PF though and added checks to prove the device is properly marked as used when we use the VF. Hopefully that\u0027s what you wanted\n\n[1] https://docs.openstack.org/nova/latest/admin/pci-passthrough.html#configure-nova-compute-compute","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1636797bf11d752003c03ad3212f8d40a35c7743","unresolved":false,"context_lines":[{"line_number":720,"context_line":"            vf_ratio\u003dvf_ratio,"},{"line_number":721,"context_line":"            vend_id\u003d\u002715b3\u0027,"},{"line_number":722,"context_line":"            vend_name\u003d\u0027Mellanox Technologies\u0027,"},{"line_number":723,"context_line":"            prod_id\u003d\u0027101d\u0027,"},{"line_number":724,"context_line":"            prod_name\u003d\u0027MT2892 Family [ConnectX-6 Dx]\u0027)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        for idx in range(num_vfs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"4db6853b_3d112c6d","line":723,"in_reply_to":"b6766dc9_041a8dcf","updated":"2021-03-12 19:15:34.000000000","message":"Thanks for the extension. For me changing that the prod_id to match the whitelist did not make the PF available in the db. But I might mixed up something in my test. Anyhow your whitelist is better.","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"37cd849c60f43e23633c77955819166b767515fe","unresolved":true,"context_lines":[{"line_number":728,"context_line":"                dev_type\u003d\u0027VF\u0027,"},{"line_number":729,"context_line":"                bus\u003d0x6,"},{"line_number":730,"context_line":"                slot\u003d0x0,"},{"line_number":731,"context_line":"                function\u003d0,"},{"line_number":732,"context_line":"                iommu_group\u003didx + 41,  # totally arbitrary number + offset"},{"line_number":733,"context_line":"                numa_node\u003d0,"},{"line_number":734,"context_line":"                vf_ratio\u003dvf_ratio,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9724940f_88238313","line":731,"updated":"2021-03-12 15:50:26.000000000","message":"In reality this should be stepped by idx to generate distinct devices. But if I do that then the assert in fake_create fails as the claim selects vhost-vdpa-3 instead of -0. \n\nMoreover now this VF has the same address as the parent PF. ... OK I can also solve that by using idx as function value. But then the L809 changes from 81:00 to 81:00.3 so somehow the function (and actually the slot) value is carried over but the bus value above does not (as 0x6 !\u003d 81)\n\nOverall I can prove that the function and the vdpa device is in sync it is just that nova selects the last free device not the fist one. The only permanent wondering of mine is the value of the bus as that is not in sync","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1c4d355f05de306d7df6331cb862e0933d6e3456","unresolved":false,"context_lines":[{"line_number":728,"context_line":"                dev_type\u003d\u0027VF\u0027,"},{"line_number":729,"context_line":"                bus\u003d0x6,"},{"line_number":730,"context_line":"                slot\u003d0x0,"},{"line_number":731,"context_line":"                function\u003d0,"},{"line_number":732,"context_line":"                iommu_group\u003didx + 41,  # totally arbitrary number + offset"},{"line_number":733,"context_line":"                numa_node\u003d0,"},{"line_number":734,"context_line":"                vf_ratio\u003dvf_ratio,"}],"source_content_type":"text/x-python","patch_set":3,"id":"b5ab41e4_3e8f6390","line":731,"in_reply_to":"9724940f_88238313","updated":"2021-03-12 17:24:22.000000000","message":"\u003e In reality this should be stepped by idx to generate distinct devices. But if I do that then the assert in fake_create fails as the claim selects vhost-vdpa-3 instead of -0. \n\nUpdated to use \u0027idx\u0027, with the text above and the test updated to expect the final VF rather than the first.\n\n\u003e Moreover now this VF has the same address as the parent PF. ... OK I can also solve that by using idx as function value. But then the L809 changes from 81:00 to 81:00.3 so somehow the function (and actually the slot) value is carried over but the bus value above does not (as 0x6 !\u003d 81)\n\u003e \n\u003e Overall I can prove that the function and the vdpa device is in sync it is just that nova selects the last free device not the fist one. The only permanent wondering of mine is the value of the bus as that is not in sync\n\nYeah, see below. I forgot to update the template for one field. This is working as expected now.","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"37cd849c60f43e23633c77955819166b767515fe","unresolved":true,"context_lines":[{"line_number":806,"context_line":"        self.assertEqual("},{"line_number":807,"context_line":"            {"},{"line_number":808,"context_line":"                \u0027pci_vendor_info\u0027: \u002715b3:101e\u0027,"},{"line_number":809,"context_line":"                \u0027pci_slot\u0027: \u00270000:81:00.0\u0027,"},{"line_number":810,"context_line":"                \u0027physical_network\u0027: \u0027physnet4\u0027,"},{"line_number":811,"context_line":"            },"},{"line_number":812,"context_line":"            port[\u0027binding:profile\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"ef6041db_4090dc93","line":809,"updated":"2021-03-12 15:50:26.000000000","message":"So all the input above uses PCI addresses in 0000:06 but this is 0000:81 here. Looking into the db the device allocated to the instance also has parent as bus\u003d06 but its own address is bus\u003d81\n\n\nSo something somewhere hardcodes a bus 81.","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1636797bf11d752003c03ad3212f8d40a35c7743","unresolved":false,"context_lines":[{"line_number":806,"context_line":"        self.assertEqual("},{"line_number":807,"context_line":"            {"},{"line_number":808,"context_line":"                \u0027pci_vendor_info\u0027: \u002715b3:101e\u0027,"},{"line_number":809,"context_line":"                \u0027pci_slot\u0027: \u00270000:81:00.0\u0027,"},{"line_number":810,"context_line":"                \u0027physical_network\u0027: \u0027physnet4\u0027,"},{"line_number":811,"context_line":"            },"},{"line_number":812,"context_line":"            port[\u0027binding:profile\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"0c45cb1c_e68fb2b0","line":809,"in_reply_to":"83ab1ee5_46f88647","updated":"2021-03-12 19:15:34.000000000","message":"cool. thanks!","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1c4d355f05de306d7df6331cb862e0933d6e3456","unresolved":false,"context_lines":[{"line_number":806,"context_line":"        self.assertEqual("},{"line_number":807,"context_line":"            {"},{"line_number":808,"context_line":"                \u0027pci_vendor_info\u0027: \u002715b3:101e\u0027,"},{"line_number":809,"context_line":"                \u0027pci_slot\u0027: \u00270000:81:00.0\u0027,"},{"line_number":810,"context_line":"                \u0027physical_network\u0027: \u0027physnet4\u0027,"},{"line_number":811,"context_line":"            },"},{"line_number":812,"context_line":"            port[\u0027binding:profile\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"83ab1ee5_46f88647","line":809,"in_reply_to":"ef6041db_4090dc93","updated":"2021-03-12 17:24:22.000000000","message":"Oh, indeed. I forgot to include the \u0027bus\u0027 field in the \u0027FakePCIDevice.pci_device_template\u0027 field of fakelibvirt. Done now.","commit_id":"73b23bdf23b63139be3677bf1fb323ed59eee15c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1636797bf11d752003c03ad3212f8d40a35c7743","unresolved":false,"context_lines":[{"line_number":680,"context_line":""},{"line_number":681,"context_line":"    # Whitelist both the PF and VF; in reality, you probably wouldn\u0027t do this"},{"line_number":682,"context_line":"    # but we want to make sure that the PF is correctly taken off the table"},{"line_number":683,"context_line":"    # once any VF is used"},{"line_number":684,"context_line":"    PCI_PASSTHROUGH_WHITELIST \u003d [jsonutils.dumps(x) for x in ("},{"line_number":685,"context_line":"        {"},{"line_number":686,"context_line":"            \u0027vendor_id\u0027: \u002715b3\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"b5db5b0d_111f6437","line":683,"updated":"2021-03-12 19:15:34.000000000","message":"We do this with PFs and VFs so that we can serve both direct and direct-physical ports on the same host, depending on the request. Sure we could separate hosts just for direct-physical and just for direct ports.","commit_id":"a4aa11d474fad1142051aba28a0286a2491b31f5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"677b036916e17a8e35c74fd7fe3b9ab6695063ae","unresolved":true,"context_lines":[{"line_number":781,"context_line":"            libvirt_version\u003dself.FAKE_LIBVIRT_VERSION,"},{"line_number":782,"context_line":"            qemu_version\u003dself.FAKE_QEMU_VERSION)"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        # only the VFs should have been counted"},{"line_number":785,"context_line":"        self.assertPCIDeviceCounts(hostname, total\u003dnum_pci, free\u003dnum_pci)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"        vdpa_port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fb5527e_0e0895fd","line":784,"range":{"start_line":784,"start_character":19,"end_line":784,"end_character":22},"updated":"2021-03-16 09:36:24.000000000","message":"to be clear, this is libvirt VF but we\u0027re tracking but it\u0027s stored in the database as \"dev_type\u003d\u0027vdpa\u0027\". We should add a test to verify the *types* of the devices in the DB as well as the counts","commit_id":"a4aa11d474fad1142051aba28a0286a2491b31f5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1636797bf11d752003c03ad3212f8d40a35c7743","unresolved":true,"context_lines":[{"line_number":781,"context_line":"            libvirt_version\u003dself.FAKE_LIBVIRT_VERSION,"},{"line_number":782,"context_line":"            qemu_version\u003dself.FAKE_QEMU_VERSION)"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        # only the VFs should have been counted"},{"line_number":785,"context_line":"        self.assertPCIDeviceCounts(hostname, total\u003dnum_pci, free\u003dnum_pci)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"        vdpa_port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"2eace9d1_f384779e","line":784,"updated":"2021-03-12 19:15:34.000000000","message":"you mean the VFs and the PFs but now extra VDPAs as each VDPA corresponds to one VF","commit_id":"a4aa11d474fad1142051aba28a0286a2491b31f5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b85d3f0300c39462b76211c9a14160a62713f429","unresolved":false,"context_lines":[{"line_number":781,"context_line":"            libvirt_version\u003dself.FAKE_LIBVIRT_VERSION,"},{"line_number":782,"context_line":"            qemu_version\u003dself.FAKE_QEMU_VERSION)"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        # only the VFs should have been counted"},{"line_number":785,"context_line":"        self.assertPCIDeviceCounts(hostname, total\u003dnum_pci, free\u003dnum_pci)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"        vdpa_port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"7cb9d6ca_e9de0f40","line":784,"range":{"start_line":784,"start_character":19,"end_line":784,"end_character":22},"in_reply_to":"1fb5527e_0e0895fd","updated":"2021-03-16 16:56:47.000000000","message":"Ack","commit_id":"a4aa11d474fad1142051aba28a0286a2491b31f5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b682848548d760b840c5dc097e7304d9da530cbf","unresolved":true,"context_lines":[{"line_number":781,"context_line":"            libvirt_version\u003dself.FAKE_LIBVIRT_VERSION,"},{"line_number":782,"context_line":"            qemu_version\u003dself.FAKE_QEMU_VERSION)"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        # only the VFs should have been counted"},{"line_number":785,"context_line":"        self.assertPCIDeviceCounts(hostname, total\u003dnum_pci, free\u003dnum_pci)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"        vdpa_port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"f8d98482_91f21c44","line":784,"in_reply_to":"2eace9d1_f384779e","updated":"2021-03-16 09:37:07.000000000","message":"Yeah, see my comment below which I\u0027d written but hadn\u0027t published","commit_id":"a4aa11d474fad1142051aba28a0286a2491b31f5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b85d3f0300c39462b76211c9a14160a62713f429","unresolved":false,"context_lines":[{"line_number":781,"context_line":"            libvirt_version\u003dself.FAKE_LIBVIRT_VERSION,"},{"line_number":782,"context_line":"            qemu_version\u003dself.FAKE_QEMU_VERSION)"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        # only the VFs should have been counted"},{"line_number":785,"context_line":"        self.assertPCIDeviceCounts(hostname, total\u003dnum_pci, free\u003dnum_pci)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"        vdpa_port \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"eb71b998_e6757b21","line":784,"in_reply_to":"f8d98482_91f21c44","updated":"2021-03-16 16:56:47.000000000","message":"Ack","commit_id":"a4aa11d474fad1142051aba28a0286a2491b31f5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1636797bf11d752003c03ad3212f8d40a35c7743","unresolved":false,"context_lines":[{"line_number":824,"context_line":"        self.assertEqual("},{"line_number":825,"context_line":"            {"},{"line_number":826,"context_line":"                \u0027pci_vendor_info\u0027: \u002715b3:101e\u0027,"},{"line_number":827,"context_line":"                \u0027pci_slot\u0027: \u00270000:06:00.4\u0027,"},{"line_number":828,"context_line":"                \u0027physical_network\u0027: \u0027physnet4\u0027,"},{"line_number":829,"context_line":"            },"},{"line_number":830,"context_line":"            port[\u0027binding:profile\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"04454fb5_c04bce12","line":827,"updated":"2021-03-12 19:15:34.000000000","message":"OK this checks out now.","commit_id":"a4aa11d474fad1142051aba28a0286a2491b31f5"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5fe9d63bb415084e7d3826ee979afb4448f7c1cf","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        self.assertNotIn(\u0027binding:profile\u0027, port)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        # create a server using the VF via neutron"},{"line_number":278,"context_line":"        flavor_id \u003d self._create_flavor()"},{"line_number":279,"context_line":"        self._create_server("},{"line_number":280,"context_line":"            flavor_id\u003dflavor_id,"},{"line_number":281,"context_line":"            networks\u003d["},{"line_number":282,"context_line":"                {\u0027port\u0027: base.LibvirtNeutronFixture.network_4_port_1[\u0027id\u0027]},"},{"line_number":283,"context_line":"            ],"}],"source_content_type":"text/x-python","patch_set":6,"id":"e5b4d53b_40fd2321","side":"PARENT","line":280,"range":{"start_line":278,"start_character":0,"end_line":280,"end_character":32},"updated":"2021-03-16 15:15:51.000000000","message":"Valid but unrelated.","commit_id":"f1f82fcecede169bf3423af9237e3a2182313504"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5fe9d63bb415084e7d3826ee979afb4448f7c1cf","unresolved":false,"context_lines":[{"line_number":548,"context_line":"        self.neutron.create_port({\u0027port\u0027: self.neutron.network_4_port_1})"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        # create a server using the VF via neutron"},{"line_number":551,"context_line":"        flavor_id \u003d self._create_flavor()"},{"line_number":552,"context_line":"        self._create_server("},{"line_number":553,"context_line":"            flavor_id\u003dflavor_id,"},{"line_number":554,"context_line":"            networks\u003d["},{"line_number":555,"context_line":"                {\u0027port\u0027: base.LibvirtNeutronFixture.network_4_port_1[\u0027id\u0027]},"},{"line_number":556,"context_line":"            ],"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff87bd88_2ad2dac3","side":"PARENT","line":553,"range":{"start_line":551,"start_character":0,"end_line":553,"end_character":32},"updated":"2021-03-16 15:15:51.000000000","message":"Valid but unrelated.","commit_id":"f1f82fcecede169bf3423af9237e3a2182313504"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5fe9d63bb415084e7d3826ee979afb4448f7c1cf","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"        orig_create \u003d nova.virt.libvirt.guest.Guest.create"},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"        def fake_create(cls, xml, host):"},{"line_number":781,"context_line":"            tree \u003d etree.fromstring(xml)"},{"line_number":782,"context_line":"            elem \u003d tree.find(\u0027./devices/interface/[@type\u003d\"vdpa\"]\u0027)"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"            # compare source device"},{"line_number":785,"context_line":"            # the MAC address is derived from the neutron port, while the"},{"line_number":786,"context_line":"            # source dev path assumes we attach vDPA devs in order"},{"line_number":787,"context_line":"            expected \u003d \"\"\""},{"line_number":788,"context_line":"                \u003cinterface type\u003d\"vdpa\"\u003e"},{"line_number":789,"context_line":"                  \u003cmac address\u003d\"b5:bc:2e:e7:51:ee\"/\u003e"},{"line_number":790,"context_line":"                  \u003cmodel type\u003d\"virtio\"/\u003e"},{"line_number":791,"context_line":"                  \u003csource dev\u003d\"/dev/vhost-vdpa-3\"/\u003e"},{"line_number":792,"context_line":"                \u003c/interface\u003e\"\"\""},{"line_number":793,"context_line":"            actual \u003d etree.tostring(elem, encoding\u003d\u0027unicode\u0027)"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"            self.assertXmlEqual(expected, actual)"},{"line_number":796,"context_line":""},{"line_number":797,"context_line":"            return orig_create(xml, host)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        self.stub_out("},{"line_number":800,"context_line":"            \u0027nova.virt.libvirt.guest.Guest.create\u0027,"},{"line_number":801,"context_line":"            fake_create,"},{"line_number":802,"context_line":"        )"},{"line_number":803,"context_line":""},{"line_number":804,"context_line":"        hostname \u003d self.start_compute()"},{"line_number":805,"context_line":"        num_pci \u003d self.NUM_PFS + self.NUM_VFS"}],"source_content_type":"text/x-python","patch_set":6,"id":"620662fc_a28f9fe2","line":802,"range":{"start_line":780,"start_character":0,"end_line":802,"end_character":9},"updated":"2021-03-16 15:15:51.000000000","message":"This works but I\u0027m also a big fan of mocking nova.virt.libvirt.driver.LibvirtDriver._get_guest_config and asserting using the config objects instead of the XML they generate.","commit_id":"e0d5781e79b749da27f9fce5c65a65353e3c9bc0"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5fe9d63bb415084e7d3826ee979afb4448f7c1cf","unresolved":true,"context_lines":[{"line_number":834,"context_line":"            port[\u0027binding:profile\u0027],"},{"line_number":835,"context_line":"        )"},{"line_number":836,"context_line":""},{"line_number":837,"context_line":"    def _test_common(self, op, *args, **kwargs):"},{"line_number":838,"context_line":"        self.start_compute()"},{"line_number":839,"context_line":""},{"line_number":840,"context_line":"        # create the port and a server, with the port attached to the server"}],"source_content_type":"text/x-python","patch_set":6,"id":"aa0afc1a_679ea452","line":837,"range":{"start_line":837,"start_character":8,"end_line":837,"end_character":20},"updated":"2021-03-16 15:15:51.000000000","message":"nit - _assert_unsupported?","commit_id":"e0d5781e79b749da27f9fce5c65a65353e3c9bc0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b85d3f0300c39462b76211c9a14160a62713f429","unresolved":true,"context_lines":[{"line_number":834,"context_line":"            port[\u0027binding:profile\u0027],"},{"line_number":835,"context_line":"        )"},{"line_number":836,"context_line":""},{"line_number":837,"context_line":"    def _test_common(self, op, *args, **kwargs):"},{"line_number":838,"context_line":"        self.start_compute()"},{"line_number":839,"context_line":""},{"line_number":840,"context_line":"        # create the port and a server, with the port attached to the server"}],"source_content_type":"text/x-python","patch_set":6,"id":"7121f47b_763de06f","line":837,"range":{"start_line":837,"start_character":8,"end_line":837,"end_character":20},"in_reply_to":"aa0afc1a_679ea452","updated":"2021-03-16 16:56:47.000000000","message":"yeah that would be a bit better in my view too. but OK to do it later in a fup","commit_id":"e0d5781e79b749da27f9fce5c65a65353e3c9bc0"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5fe9d63bb415084e7d3826ee979afb4448f7c1cf","unresolved":true,"context_lines":[{"line_number":842,"context_line":"        server \u003d self._create_server(networks\u003d[{\u0027port\u0027: vdpa_port[\u0027id\u0027]}])"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"        # attempt the unsupported action and ensure it fails"},{"line_number":845,"context_line":"        ex \u003d self.assertRaises("},{"line_number":846,"context_line":"            client.OpenStackApiException,"},{"line_number":847,"context_line":"            op, server, *args, **kwargs)"},{"line_number":848,"context_line":"        self.assertIn("},{"line_number":849,"context_line":"            \u0027not supported for instance with vDPA ports\u0027,"},{"line_number":850,"context_line":"            ex.response.text)"},{"line_number":851,"context_line":""},{"line_number":852,"context_line":"    def test_attach_interface(self):"},{"line_number":853,"context_line":"        self.start_compute()"}],"source_content_type":"text/x-python","patch_set":6,"id":"26af4905_7cbe724e","line":850,"range":{"start_line":845,"start_character":0,"end_line":850,"end_character":29},"updated":"2021-03-16 15:15:51.000000000","message":"nit - assert the return code?\n\n  self.assertEqual(409, ex.response.status_code)","commit_id":"e0d5781e79b749da27f9fce5c65a65353e3c9bc0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b85d3f0300c39462b76211c9a14160a62713f429","unresolved":true,"context_lines":[{"line_number":842,"context_line":"        server \u003d self._create_server(networks\u003d[{\u0027port\u0027: vdpa_port[\u0027id\u0027]}])"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"        # attempt the unsupported action and ensure it fails"},{"line_number":845,"context_line":"        ex \u003d self.assertRaises("},{"line_number":846,"context_line":"            client.OpenStackApiException,"},{"line_number":847,"context_line":"            op, server, *args, **kwargs)"},{"line_number":848,"context_line":"        self.assertIn("},{"line_number":849,"context_line":"            \u0027not supported for instance with vDPA ports\u0027,"},{"line_number":850,"context_line":"            ex.response.text)"},{"line_number":851,"context_line":""},{"line_number":852,"context_line":"    def test_attach_interface(self):"},{"line_number":853,"context_line":"        self.start_compute()"}],"source_content_type":"text/x-python","patch_set":6,"id":"af67af7a_86bd4917","line":850,"range":{"start_line":845,"start_character":0,"end_line":850,"end_character":29},"in_reply_to":"26af4905_7cbe724e","updated":"2021-03-16 16:56:47.000000000","message":"+1 (but not blocking as the unit test coverage in the previous patch asserts it)","commit_id":"e0d5781e79b749da27f9fce5c65a65353e3c9bc0"}]}
