)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"29d7ea47002d02234205337e04265dd4faab40e7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"49d65b4b_8b5dbdcc","updated":"2023-01-10 09:20:50.000000000","message":"Looks good but hacking needs some adjustment.","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4fe4c62d6b87d12fbbfdefb0a85f9d24febd3bd0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e9dbc49a_8d0499d7","updated":"2023-01-10 13:15:06.000000000","message":"over all i think this looks ok\ncome comments inline","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"224cdbb83a0cdcfb350bcba61d493754015d5f7f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"eae4979d_be61e6be","updated":"2023-01-26 10:38:06.000000000","message":"looks good to me","commit_id":"0caf24f308e754884b53b244f5b6228c9c2e4147"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"48a635a47b2ddeb6d9718daabbf6dfb99102455a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"610256a7_db388513","updated":"2023-01-27 16:16:32.000000000","message":"recheck typical unrelated volume test failure","commit_id":"0caf24f308e754884b53b244f5b6228c9c2e4147"}],"nova/tests/functional/compute/test_resource_tracker.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4fe4c62d6b87d12fbbfdefb0a85f9d24febd3bd0","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                \u0027numa_topology\u0027: None,"},{"line_number":249,"context_line":"                \u0027resource_class\u0027: None,  # Act like admin hasn\u0027t set yet..."},{"line_number":250,"context_line":"                \u0027stats\u0027: stats,"},{"line_number":251,"context_line":"                \u0027uuid\u0027: str(getattr(uuids, nodename)),"},{"line_number":252,"context_line":"            }"},{"line_number":253,"context_line":"            self.rt.update_available_resource(self.ctx, nodename)"},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"d76dabbc_b257927c","line":251,"updated":"2023-01-10 13:15:06.000000000","message":"i guess this is fine in test code.\n\ni generall prefer to avoid getattr but this does allow you to use the uuid sentinal to cleanly generate stable uuids dynamically and cleanly.","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"}],"nova/tests/functional/libvirt/base.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4fe4c62d6b87d12fbbfdefb0a85f9d24febd3bd0","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.assertNotIn(hostname, self.compute_rp_uuids)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        with mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:"},{"line_number":182,"context_line":"            m.return_value \u003d str(getattr(uuids, \u0027node_%s\u0027 % hostname))"},{"line_number":183,"context_line":"            self.computes[hostname] \u003d _start_compute(hostname, host_info)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        self.compute_rp_uuids[hostname] \u003d self.placement.get("}],"source_content_type":"text/x-python","patch_set":2,"id":"8b9d0823_a5020e18","line":182,"updated":"2023-01-10 13:15:06.000000000","message":"ok so this is requried to ensure that each comptue has a diffent node local uuid and you are usign the host name to prevent collisions.","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ba83ea7b8c6f96e20aac1d8c51cf2e7835bd3a57","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.assertNotIn(hostname, self.compute_rp_uuids)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        with mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:"},{"line_number":182,"context_line":"            m.return_value \u003d str(getattr(uuids, \u0027node_%s\u0027 % hostname))"},{"line_number":183,"context_line":"            self.computes[hostname] \u003d _start_compute(hostname, host_info)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        self.compute_rp_uuids[hostname] \u003d self.placement.get("}],"source_content_type":"text/x-python","patch_set":2,"id":"fc27b13d_98c01ccb","line":182,"in_reply_to":"8b9d0823_a5020e18","updated":"2023-01-10 15:04:47.000000000","message":"Yeah, for things like migration tests.","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"}],"nova/tests/functional/libvirt/test_evacuate.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4fe4c62d6b87d12fbbfdefb0a85f9d24febd3bd0","unresolved":true,"context_lines":[{"line_number":413,"context_line":"        # service has started, we poke a custom getHostname into the"},{"line_number":414,"context_line":"        # instantiated object to do the same thing, but only for that object."},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        with mock.patch.object(fakelibvirt.Connection, \u0027getHostname\u0027,"},{"line_number":417,"context_line":"                               return_value\u003dname):"},{"line_number":418,"context_line":"            with mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:"},{"line_number":419,"context_line":"                m.return_value \u003d str(getattr(uuids, \u0027node_%s\u0027 % name))"},{"line_number":420,"context_line":"                compute \u003d self.start_service(\u0027compute\u0027, host\u003dname)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        compute.driver._host.get_connection().getHostname \u003d lambda: name"}],"source_content_type":"text/x-python","patch_set":2,"id":"a69ab5b4_e8b83ed9","line":419,"range":{"start_line":416,"start_character":8,"end_line":419,"end_character":70},"updated":"2023-01-10 13:15:06.000000000","message":"nit: you do not need to double indent like this\n```\n        with mock.patch.object(fakelibvirt.Connection, \u0027getHostname\u0027,\n                               return_value\u003dname):\n            with mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:\n                m.return_value \u003d str(getattr(uuids, \u0027node_%s\u0027 % name))\n```                \ncan be converted with the old style \"with test.nested(\"\n\nhttps://github.com/openstack/nova/blob/1c46c4e9e5ba4b84816f5cadad0674f3a773e739/nova/tests/unit/conductor/tasks/test_live_migrate.py#L97\n\n```\nwith test.nested(\n    mock.patch.object(fakelibvirt.Connection, \u0027getHostname\u0027,\n                      return_value\u003dname),\n    mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:\n               m.return_value \u003d str(getattr(uuids, \u0027node_%s\u0027 % name)\n) as (_, m):\n```\nwe used to use from contextlib import nested  for ^ when we needed py27 support\n\nwith ptyhon 3.10 you can do\n```\nwith (\n    mock.patch.object(fakelibvirt.Connection, \u0027getHostname\u0027,\n                      return_value\u003dname) as _,\n    mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m,\n):\n    ...\n```    \n    \nhowever since we need to supprot 3.8 you would have to do this\n```\nwith mock.patch.object(\n    fakelibvirt.Connection, \u0027getHostname\u0027, return_value\u003dname) as _, \\\n    mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:\n    ...\n```    \n    \nhttps://stackoverflow.com/a/46481946","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c32a652b3fb0013a38041884101c8d0405563553","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        # service has started, we poke a custom getHostname into the"},{"line_number":414,"context_line":"        # instantiated object to do the same thing, but only for that object."},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        with mock.patch.object(fakelibvirt.Connection, \u0027getHostname\u0027,"},{"line_number":417,"context_line":"                               return_value\u003dname):"},{"line_number":418,"context_line":"            with mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:"},{"line_number":419,"context_line":"                m.return_value \u003d str(getattr(uuids, \u0027node_%s\u0027 % name))"},{"line_number":420,"context_line":"                compute \u003d self.start_service(\u0027compute\u0027, host\u003dname)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        compute.driver._host.get_connection().getHostname \u003d lambda: name"}],"source_content_type":"text/x-python","patch_set":2,"id":"429adb84_3ffbaa68","line":419,"range":{"start_line":416,"start_character":8,"end_line":419,"end_character":70},"in_reply_to":"29056b63_e7276cb7","updated":"2023-01-18 06:34:36.000000000","message":"Ack","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ba83ea7b8c6f96e20aac1d8c51cf2e7835bd3a57","unresolved":true,"context_lines":[{"line_number":413,"context_line":"        # service has started, we poke a custom getHostname into the"},{"line_number":414,"context_line":"        # instantiated object to do the same thing, but only for that object."},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        with mock.patch.object(fakelibvirt.Connection, \u0027getHostname\u0027,"},{"line_number":417,"context_line":"                               return_value\u003dname):"},{"line_number":418,"context_line":"            with mock.patch(\u0027nova.virt.node.get_local_node_uuid\u0027) as m:"},{"line_number":419,"context_line":"                m.return_value \u003d str(getattr(uuids, \u0027node_%s\u0027 % name))"},{"line_number":420,"context_line":"                compute \u003d self.start_service(\u0027compute\u0027, host\u003dname)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        compute.driver._host.get_connection().getHostname \u003d lambda: name"}],"source_content_type":"text/x-python","patch_set":2,"id":"29056b63_e7276cb7","line":419,"range":{"start_line":416,"start_character":8,"end_line":419,"end_character":70},"in_reply_to":"a69ab5b4_e8b83ed9","updated":"2023-01-10 15:04:47.000000000","message":"Yeah, I really don\u0027t like the way either of these look, so for just two small things I usually do the double with because I think it\u0027s easier to read. Once I get to more, I either use nested or a closure with decorators.","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c32a652b3fb0013a38041884101c8d0405563553","unresolved":true,"context_lines":[{"line_number":840,"context_line":"        return node_uuids"},{"line_number":841,"context_line":""},{"line_number":842,"context_line":"    def get_available_node_uuids(self, refresh\u003dFalse):"},{"line_number":843,"context_line":"        return self.get_available_nodes(refresh\u003drefresh)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def update_provider_tree(self, provider_tree, nodename, allocations\u003dNone):"},{"line_number":846,"context_line":"        \"\"\"Update a ProviderTree object with current resource provider and"}],"source_content_type":"text/x-python","patch_set":7,"id":"c673c202_aa45d630","line":843,"updated":"2023-01-18 06:34:36.000000000","message":"ok so refresh is only used for ironic\ni was wondering why it was there since it was not used in the other drivers but makes sense we want to conditionally refersh the cache in the ironic case.","commit_id":"5e0c9ad47f1e1a6f9535848bf7965839ea310474"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"50003738de6ddef98085709909f873264e1a2b01","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        return node_uuids"},{"line_number":841,"context_line":""},{"line_number":842,"context_line":"    def get_available_node_uuids(self, refresh\u003dFalse):"},{"line_number":843,"context_line":"        return self.get_available_nodes(refresh\u003drefresh)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def update_provider_tree(self, provider_tree, nodename, allocations\u003dNone):"},{"line_number":846,"context_line":"        \"\"\"Update a ProviderTree object with current resource provider and"}],"source_content_type":"text/x-python","patch_set":7,"id":"c24311c0_eb34177e","line":843,"in_reply_to":"c673c202_aa45d630","updated":"2023-01-26 21:01:06.000000000","message":"Ack","commit_id":"5e0c9ad47f1e1a6f9535848bf7965839ea310474"}],"nova/virt/libvirt/host.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"29d7ea47002d02234205337e04265dd4faab40e7","unresolved":true,"context_lines":[{"line_number":66,"context_line":"from nova.virt.libvirt import guest as libvirt_guest"},{"line_number":67,"context_line":"from nova.virt.libvirt import migration as libvirt_migrate"},{"line_number":68,"context_line":"from nova.virt.libvirt import utils as libvirt_utils"},{"line_number":69,"context_line":"import nova.virt.node"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"if ty.TYPE_CHECKING:"},{"line_number":72,"context_line":"    import libvirt"}],"source_content_type":"text/x-python","patch_set":2,"id":"da4f5d6c_731015a5","line":69,"in_reply_to":"08834b4b_2d521ad5","updated":"2023-01-10 09:20:50.000000000","message":"\u003e pep8: N311: importing code from other virt drivers forbidden\n\nProbably the hacking rule needs a change to allow importing nova.virt.node as it is virt driver agonstic","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"87fd7e844784e83939ea297489588db489deacc5","unresolved":true,"context_lines":[{"line_number":66,"context_line":"from nova.virt.libvirt import guest as libvirt_guest"},{"line_number":67,"context_line":"from nova.virt.libvirt import migration as libvirt_migrate"},{"line_number":68,"context_line":"from nova.virt.libvirt import utils as libvirt_utils"},{"line_number":69,"context_line":"import nova.virt.node"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"if ty.TYPE_CHECKING:"},{"line_number":72,"context_line":"    import libvirt"}],"source_content_type":"text/x-python","patch_set":2,"id":"c34a3422_4189f40e","line":69,"in_reply_to":"1f32f005_697e1ea9","updated":"2023-01-10 15:12:27.000000000","message":"flake will honer #noqa so it should disable the hacking checks on #noqa lines too ya","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ba83ea7b8c6f96e20aac1d8c51cf2e7835bd3a57","unresolved":true,"context_lines":[{"line_number":66,"context_line":"from nova.virt.libvirt import guest as libvirt_guest"},{"line_number":67,"context_line":"from nova.virt.libvirt import migration as libvirt_migrate"},{"line_number":68,"context_line":"from nova.virt.libvirt import utils as libvirt_utils"},{"line_number":69,"context_line":"import nova.virt.node"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"if ty.TYPE_CHECKING:"},{"line_number":72,"context_line":"    import libvirt"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f32f005_697e1ea9","line":69,"in_reply_to":"253388d8_7b53ee29","updated":"2023-01-10 15:04:47.000000000","message":"Or I think I can just #noqa it right?","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c32a652b3fb0013a38041884101c8d0405563553","unresolved":false,"context_lines":[{"line_number":66,"context_line":"from nova.virt.libvirt import guest as libvirt_guest"},{"line_number":67,"context_line":"from nova.virt.libvirt import migration as libvirt_migrate"},{"line_number":68,"context_line":"from nova.virt.libvirt import utils as libvirt_utils"},{"line_number":69,"context_line":"import nova.virt.node"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"if ty.TYPE_CHECKING:"},{"line_number":72,"context_line":"    import libvirt"}],"source_content_type":"text/x-python","patch_set":2,"id":"82973d11_f9ac9ef7","line":69,"in_reply_to":"c34a3422_4189f40e","updated":"2023-01-18 06:34:36.000000000","message":"Done","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4fe4c62d6b87d12fbbfdefb0a85f9d24febd3bd0","unresolved":true,"context_lines":[{"line_number":66,"context_line":"from nova.virt.libvirt import guest as libvirt_guest"},{"line_number":67,"context_line":"from nova.virt.libvirt import migration as libvirt_migrate"},{"line_number":68,"context_line":"from nova.virt.libvirt import utils as libvirt_utils"},{"line_number":69,"context_line":"import nova.virt.node"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"if ty.TYPE_CHECKING:"},{"line_number":72,"context_line":"    import libvirt"}],"source_content_type":"text/x-python","patch_set":2,"id":"253388d8_7b53ee29","line":69,"in_reply_to":"da4f5d6c_731015a5","updated":"2023-01-10 13:15:06.000000000","message":"i suspect you could work around this with \n\nfrom nova.virt import node as virt_node\n\nim usign virt_node intentionally do make sure we dont conuse this with teh compute node object or similar.","commit_id":"b9992ffb96c9db316dc31b3c1be1fe955e422440"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"50003738de6ddef98085709909f873264e1a2b01","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"                      {\u0027old\u0027: self._hostname, \u0027new\u0027: hostname})"},{"line_number":1062,"context_line":"        return self._hostname"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"    def get_node_uuid(self):"},{"line_number":1065,"context_line":"        \"\"\"Returns the UUID of this node.\"\"\""},{"line_number":1066,"context_line":"        if not self._node_uuid:"},{"line_number":1067,"context_line":"            self._node_uuid \u003d nova.virt.node.get_local_node_uuid()"}],"source_content_type":"text/x-python","patch_set":8,"id":"a8211836_735b2237","line":1064,"updated":"2023-01-26 21:01:06.000000000","message":"nit: i probably would have made this a property by the way but this is fine too you just wnat it to initalise once","commit_id":"0caf24f308e754884b53b244f5b6228c9c2e4147"}]}
