)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e6029aa7abda226f565d27002c05d51deac78ef0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"07acea4d_e8975271","updated":"2023-10-24 07:50:06.000000000","message":"-1 for further discussion.","commit_id":"3ccba9490050a79421d4c2849bf5cfda28ab39a2"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"25c033d22c4dbdfc006d7cdb75de2620db46350b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"def0d72e_548111a9","updated":"2023-10-24 09:40:08.000000000","message":"Thanks Harald! I really like this idea of being able to filter these segments","commit_id":"2299feb78b62960f1f9769ecc196b2a5d7587ef1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87d5d4c3980a903f241e255a4ec294eec5b40270","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"9d841861_c5937b10","updated":"2023-10-24 18:06:22.000000000","message":"-1 really to get eyes on the sqlalchemy change","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"51326093_830cfff1","updated":"2023-10-25 07:18:08.000000000","message":"@Julia, any thoughts on the sqlalchemy bit?","commit_id":"10d512545c763ac0aa59b20be7550fc268608631"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"815d291776aab0e43bbe412e797289efdffe2239","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"5cd962fe_918d71b4","updated":"2023-10-30 09:36:46.000000000","message":"Looks ok","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"db1792585b0dc81f42f50c77653a24a42f0e9755","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"62fa22a5_62bd9953","updated":"2023-10-26 07:45:21.000000000","message":"recheck","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7527bf0132f3bc20ef656643df7187cb39387e99","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"8b881321_32ea74bb","updated":"2023-10-31 09:03:05.000000000","message":"recheck\n\njob timed out","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"f542b662fddc76b57f9c931ec631f4eb38034abf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"1ad09c63_dfe58832","updated":"2023-10-25 17:45:31.000000000","message":"recheck (TIMEOUT)","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c64fa38381dc24dc91052b661cac1ab8d33d1fa3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"2f97fc7e_a6b36b66","updated":"2023-10-31 05:02:33.000000000","message":"recheck - Timeout","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"133c364358c8f24413797ec5034a784a8de982e0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"b4a16f4c_c8fc7f44","updated":"2023-11-03 12:56:36.000000000","message":"recheck - neutron-fullstack-with-uwsgi","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"95666ff88bbd3255f78511d7e018a72d46e90e3f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"5436d8f9_368b67aa","updated":"2023-11-01 09:22:47.000000000","message":"recheck - neutron-fullstack-with-uwsgi TIMEOUT","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"29c167b29f2468569fb9cde288c741a2c70c375d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"6d69f645_c230a10c","updated":"2023-11-02 01:59:03.000000000","message":"recheck - timeout","commit_id":"64b5787c3283b29cd36dde46ae298ae332f972d5"}],"neutron/services/segments/db.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"25c033d22c4dbdfc006d7cdb75de2620db46350b","unresolved":true,"context_lines":[{"line_number":245,"context_line":"                              entry.segment_id, entry.host)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"def get_hosts_mapped_with_segments(context, include_agent_types\u003dset(),"},{"line_number":249,"context_line":"                                   exclude_agent_types\u003dset()):"},{"line_number":250,"context_line":"    \"\"\"Get hosts that are mapped with segments."},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    L2 providers can use this method to get an overview of SegmentHostMapping,"}],"source_content_type":"text/x-python","patch_set":3,"id":"6325f9ca_43f94ba8","line":249,"range":{"start_line":248,"start_character":44,"end_line":249,"end_character":62},"updated":"2023-10-24 09:40:08.000000000","message":"Let\u0027s avoid using mutable default arguments in python, it\u0027s not a good practice\n\n```\ndef get_hosts_mapped_with_segments(context, include_agent_types\u003dNone,\n                                   exclude_agent_types\u003dNone):     \n```","commit_id":"2299feb78b62960f1f9769ecc196b2a5d7587ef1"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"0026bf606fcadf8cd0ded99cdda41eb787012fc2","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                              entry.segment_id, entry.host)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"def get_hosts_mapped_with_segments(context, include_agent_types\u003dset(),"},{"line_number":249,"context_line":"                                   exclude_agent_types\u003dset()):"},{"line_number":250,"context_line":"    \"\"\"Get hosts that are mapped with segments."},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    L2 providers can use this method to get an overview of SegmentHostMapping,"}],"source_content_type":"text/x-python","patch_set":3,"id":"a03f55d5_8b8225f0","line":249,"range":{"start_line":248,"start_character":44,"end_line":249,"end_character":62},"in_reply_to":"6325f9ca_43f94ba8","updated":"2023-10-24 10:08:24.000000000","message":"Done","commit_id":"2299feb78b62960f1f9769ecc196b2a5d7587ef1"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"25c033d22c4dbdfc006d7cdb75de2620db46350b","unresolved":true,"context_lines":[{"line_number":256,"context_line":"    exclude_agent_types is most significant."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param include_agent_types: - Filter include host on agent_types"},{"line_number":259,"context_line":"    :param exclude_agent_types: - Filter exclude host on agent_types"},{"line_number":260,"context_line":"    \"\"\""},{"line_number":261,"context_line":"    def add_filter_by_agent_types(qry, include, exclude):"},{"line_number":262,"context_line":"        qry \u003d qry.join("}],"source_content_type":"text/x-python","patch_set":3,"id":"3b90fd12_43ff6a72","line":259,"updated":"2023-10-24 09:40:08.000000000","message":"Nit: Should we mention that a list/set is expected for these parameters ?","commit_id":"2299feb78b62960f1f9769ecc196b2a5d7587ef1"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"0026bf606fcadf8cd0ded99cdda41eb787012fc2","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    exclude_agent_types is most significant."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    :param include_agent_types: - Filter include host on agent_types"},{"line_number":259,"context_line":"    :param exclude_agent_types: - Filter exclude host on agent_types"},{"line_number":260,"context_line":"    \"\"\""},{"line_number":261,"context_line":"    def add_filter_by_agent_types(qry, include, exclude):"},{"line_number":262,"context_line":"        qry \u003d qry.join("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa73846b_d2e7c93d","line":259,"in_reply_to":"3b90fd12_43ff6a72","updated":"2023-10-24 10:08:24.000000000","message":"Done","commit_id":"2299feb78b62960f1f9769ecc196b2a5d7587ef1"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"25c033d22c4dbdfc006d7cdb75de2620db46350b","unresolved":true,"context_lines":[{"line_number":274,"context_line":"        query \u003d add_filter_by_agent_types(query, include_agent_types,"},{"line_number":275,"context_line":"                                          exclude_agent_types)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    segment_host_mapping \u003d query.all()"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    return {row.host for row in segment_host_mapping}"},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"972fcbdd_5f153a02","line":277,"range":{"start_line":277,"start_character":4,"end_line":277,"end_character":38},"updated":"2023-10-24 09:40:08.000000000","message":"nit: Don\u0027t need to save the result in a variable before, just do:\n\n```\nreturn {row.host for row in query.all()}\n```","commit_id":"2299feb78b62960f1f9769ecc196b2a5d7587ef1"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"0026bf606fcadf8cd0ded99cdda41eb787012fc2","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        query \u003d add_filter_by_agent_types(query, include_agent_types,"},{"line_number":275,"context_line":"                                          exclude_agent_types)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    segment_host_mapping \u003d query.all()"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    return {row.host for row in segment_host_mapping}"},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"c36f3091_e52db77b","line":277,"range":{"start_line":277,"start_character":4,"end_line":277,"end_character":38},"in_reply_to":"972fcbdd_5f153a02","updated":"2023-10-24 10:08:24.000000000","message":"Done","commit_id":"2299feb78b62960f1f9769ecc196b2a5d7587ef1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87d5d4c3980a903f241e255a4ec294eec5b40270","unresolved":true,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        return qry"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    query \u003d context.session.query(segment_model.SegmentHostMapping)"},{"line_number":276,"context_line":"    if include_agent_types or exclude_agent_types:"},{"line_number":277,"context_line":"        query \u003d add_filter_by_agent_types(query, include_agent_types,"},{"line_number":278,"context_line":"                                          exclude_agent_types)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9225af92_e1b64116","line":275,"updated":"2023-10-24 18:06:22.000000000","message":"I think this looks Ok, but I want to defer to someone with more sqlalchemy knowledge than myself as I\u0027m unsure if this change now requires the \"@db_api.CONTEXT_READER\" decorator on this function.","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"db1792585b0dc81f42f50c77653a24a42f0e9755","unresolved":true,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        return qry"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    query \u003d context.session.query(segment_model.SegmentHostMapping)"},{"line_number":276,"context_line":"    if include_agent_types or exclude_agent_types:"},{"line_number":277,"context_line":"        query \u003d add_filter_by_agent_types(query, include_agent_types,"},{"line_number":278,"context_line":"                                          exclude_agent_types)"}],"source_content_type":"text/x-python","patch_set":4,"id":"57b63692_7129d799","line":275,"in_reply_to":"2a11bed1_248cd593","updated":"2023-10-26 07:45:21.000000000","message":"Done","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f6c6bdbd3ac8d212331b0403de41268547aa22cc","unresolved":true,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        return qry"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    query \u003d context.session.query(segment_model.SegmentHostMapping)"},{"line_number":276,"context_line":"    if include_agent_types or exclude_agent_types:"},{"line_number":277,"context_line":"        query \u003d add_filter_by_agent_types(query, include_agent_types,"},{"line_number":278,"context_line":"                                          exclude_agent_types)"}],"source_content_type":"text/x-python","patch_set":4,"id":"2a11bed1_248cd593","line":275,"in_reply_to":"6f6aef9c_e001815b","updated":"2023-10-25 13:26:30.000000000","message":"++ on the context, good catch!","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":true,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        return qry"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    query \u003d context.session.query(segment_model.SegmentHostMapping)"},{"line_number":276,"context_line":"    if include_agent_types or exclude_agent_types:"},{"line_number":277,"context_line":"        query \u003d add_filter_by_agent_types(query, include_agent_types,"},{"line_number":278,"context_line":"                                          exclude_agent_types)"}],"source_content_type":"text/x-python","patch_set":4,"id":"6f6aef9c_e001815b","line":275,"in_reply_to":"9225af92_e1b64116","updated":"2023-10-25 07:18:08.000000000","message":"yes, good catch on the context - not a sqlalchemy guru either but I changed this to us a context manager. Do the query and store results in the context manager. Then outside context manager process and return hosts. I think this should be safe.\n\n@Julia - thoughts?\n\n```\n    with db_api.CONTEXT_READER.using(context):\n        query \u003d context.session.query(segment_model.SegmentHostMapping)\n        if include_agent_types or exclude_agent_types:\n            query \u003d add_filter_by_agent_types(query, include_agent_types,\n                                              exclude_agent_types)\n\n        res \u003d query.all()\n\n    return {row.host for row in res}\n```","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f6c6bdbd3ac8d212331b0403de41268547aa22cc","unresolved":true,"context_lines":[{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    When using both include_agent_types and exclude_agent_types,"},{"line_number":256,"context_line":"    exclude_agent_types is most significant."},{"line_number":257,"context_line":"    All hosts without agent are excluded whe using any agent_type filter."},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    :param context: current running context information"},{"line_number":260,"context_line":"    :param include_agent_types: (set) List of agent types, include hosts"}],"source_content_type":"text/x-python","patch_set":6,"id":"50739c5d_5695677a","line":257,"range":{"start_line":257,"start_character":41,"end_line":257,"end_character":44},"updated":"2023-10-25 13:26:30.000000000","message":"when","commit_id":"10d512545c763ac0aa59b20be7550fc268608631"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"bd37bd69bbc452ebd9c4bd5d92162c1d5fcafcdf","unresolved":false,"context_lines":[{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    When using both include_agent_types and exclude_agent_types,"},{"line_number":256,"context_line":"    exclude_agent_types is most significant."},{"line_number":257,"context_line":"    All hosts without agent are excluded whe using any agent_type filter."},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    :param context: current running context information"},{"line_number":260,"context_line":"    :param include_agent_types: (set) List of agent types, include hosts"}],"source_content_type":"text/x-python","patch_set":6,"id":"43aab7ce_aa1830e1","line":257,"range":{"start_line":257,"start_character":41,"end_line":257,"end_character":44},"in_reply_to":"50739c5d_5695677a","updated":"2023-10-25 14:33:06.000000000","message":"oops, Done!","commit_id":"10d512545c763ac0aa59b20be7550fc268608631"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":false,"context_lines":[{"line_number":913,"context_line":"        actual_hosts \u003d db.get_hosts_mapped_with_segments(ctx)"},{"line_number":914,"context_line":"        self.assertEqual(hosts, actual_hosts)"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"    def test_get_all_hosts_mapped_with_segments_two_hosts_one_ovs_agent(self):"},{"line_number":917,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":918,"context_line":"        hosts \u003d set()"},{"line_number":919,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":4,"id":"a88d9474_7025e4d5","line":916,"range":{"start_line":916,"start_character":8,"end_line":916,"end_character":71},"updated":"2023-10-25 07:18:08.000000000","message":"Also renamed this","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87d5d4c3980a903f241e255a4ec294eec5b40270","unresolved":true,"context_lines":[{"line_number":933,"context_line":"                plugin\u003dself.plugin, start_flag\u003dTrue)"},{"line_number":934,"context_line":"            db.update_segment_host_mapping("},{"line_number":935,"context_line":"                ctx, host, {segment[\u0027segment\u0027][\u0027id\u0027]})"},{"line_number":936,"context_line":"            hosts.add(host)"},{"line_number":937,"context_line":""},{"line_number":938,"context_line":"        # Now they are 2 hosts with segment being mapped."},{"line_number":939,"context_line":"        #   host1 is AGENT_TYPE_LINUXBRIDGE"}],"source_content_type":"text/x-python","patch_set":4,"id":"bc997a15_a416b040","line":936,"updated":"2023-10-24 18:06:22.000000000","message":"\u0027hosts\u0027 is never used below, you should either remove it altogether or use it on L961","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":false,"context_lines":[{"line_number":933,"context_line":"                plugin\u003dself.plugin, start_flag\u003dTrue)"},{"line_number":934,"context_line":"            db.update_segment_host_mapping("},{"line_number":935,"context_line":"                ctx, host, {segment[\u0027segment\u0027][\u0027id\u0027]})"},{"line_number":936,"context_line":"            hosts.add(host)"},{"line_number":937,"context_line":""},{"line_number":938,"context_line":"        # Now they are 2 hosts with segment being mapped."},{"line_number":939,"context_line":"        #   host1 is AGENT_TYPE_LINUXBRIDGE"}],"source_content_type":"text/x-python","patch_set":4,"id":"76e65c20_2af8451e","line":936,"in_reply_to":"bc997a15_a416b040","updated":"2023-10-25 07:18:08.000000000","message":"Done","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87d5d4c3980a903f241e255a4ec294eec5b40270","unresolved":true,"context_lines":[{"line_number":937,"context_line":""},{"line_number":938,"context_line":"        # Now they are 2 hosts with segment being mapped."},{"line_number":939,"context_line":"        #   host1 is AGENT_TYPE_LINUXBRIDGE"},{"line_number":940,"context_line":"        #   host2 is AGENT_TYPE_OVS"},{"line_number":941,"context_line":"        # get host1 when exclude OVS agents"},{"line_number":942,"context_line":"        actual_hosts \u003d db.get_hosts_mapped_with_segments("},{"line_number":943,"context_line":"            ctx, exclude_agent_types\u003d{self.agent_type_a})"}],"source_content_type":"text/x-python","patch_set":4,"id":"00a7ed4a_b2ffe273","line":940,"updated":"2023-10-24 18:06:22.000000000","message":"nit: this comment doesn\u0027t apply in the subclasses that inherit this test","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":false,"context_lines":[{"line_number":937,"context_line":""},{"line_number":938,"context_line":"        # Now they are 2 hosts with segment being mapped."},{"line_number":939,"context_line":"        #   host1 is AGENT_TYPE_LINUXBRIDGE"},{"line_number":940,"context_line":"        #   host2 is AGENT_TYPE_OVS"},{"line_number":941,"context_line":"        # get host1 when exclude OVS agents"},{"line_number":942,"context_line":"        actual_hosts \u003d db.get_hosts_mapped_with_segments("},{"line_number":943,"context_line":"            ctx, exclude_agent_types\u003d{self.agent_type_a})"}],"source_content_type":"text/x-python","patch_set":4,"id":"f21b44a9_8175a13f","line":940,"in_reply_to":"00a7ed4a_b2ffe273","updated":"2023-10-25 07:18:08.000000000","message":"rigth, I changed the comments to use \"agent_type_a\"/\"agent_type_b\"","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87d5d4c3980a903f241e255a4ec294eec5b40270","unresolved":true,"context_lines":[{"line_number":966,"context_line":"                                 self.agent_type_a},"},{"line_number":967,"context_line":"            exclude_agent_types\u003d{self.agent_type_b}"},{"line_number":968,"context_line":"        )"},{"line_number":969,"context_line":"        self.assertEqual({\"host2\"}, actual_hosts)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_get_all_hosts_mapped_with_segments_no_ovs_agent(self):"},{"line_number":972,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":4,"id":"90ac058b_d16328f1","line":969,"updated":"2023-10-24 18:06:22.000000000","message":"I guess the other test is to exclude both, which should result in {}","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":false,"context_lines":[{"line_number":966,"context_line":"                                 self.agent_type_a},"},{"line_number":967,"context_line":"            exclude_agent_types\u003d{self.agent_type_b}"},{"line_number":968,"context_line":"        )"},{"line_number":969,"context_line":"        self.assertEqual({\"host2\"}, actual_hosts)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_get_all_hosts_mapped_with_segments_no_ovs_agent(self):"},{"line_number":972,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":4,"id":"41c0d091_c60683cd","line":969,"in_reply_to":"90ac058b_d16328f1","updated":"2023-10-25 07:18:08.000000000","message":"Added test including and excluding both agent types. Result {}","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"87d5d4c3980a903f241e255a4ec294eec5b40270","unresolved":true,"context_lines":[{"line_number":982,"context_line":"                                 plugin\u003dself.plugin)"},{"line_number":983,"context_line":"            db.update_segment_host_mapping("},{"line_number":984,"context_line":"                ctx, host, {segment[\u0027segment\u0027][\u0027id\u0027]})"},{"line_number":985,"context_line":"            hosts.add(host)"},{"line_number":986,"context_line":""},{"line_number":987,"context_line":"        # Now they are 2 hosts with segment being mapped."},{"line_number":988,"context_line":"        actual_hosts \u003d db.get_hosts_mapped_with_segments("}],"source_content_type":"text/x-python","patch_set":4,"id":"f0ce5372_d5f73d24","line":985,"updated":"2023-10-24 18:06:22.000000000","message":"Same here, \u0027hosts\u0027 is unused below.","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":false,"context_lines":[{"line_number":982,"context_line":"                                 plugin\u003dself.plugin)"},{"line_number":983,"context_line":"            db.update_segment_host_mapping("},{"line_number":984,"context_line":"                ctx, host, {segment[\u0027segment\u0027][\u0027id\u0027]})"},{"line_number":985,"context_line":"            hosts.add(host)"},{"line_number":986,"context_line":""},{"line_number":987,"context_line":"        # Now they are 2 hosts with segment being mapped."},{"line_number":988,"context_line":"        actual_hosts \u003d db.get_hosts_mapped_with_segments("}],"source_content_type":"text/x-python","patch_set":4,"id":"b9c6f8e0_9130226c","line":985,"in_reply_to":"f0ce5372_d5f73d24","updated":"2023-10-25 07:18:08.000000000","message":"Done, also re-named the test and updated it to try both an include and an exclude.","commit_id":"bbf92480a65de3fed92a3a556b5bd67b6b120900"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"c03a87fd3dc5224a5cea13e1f0c9e2fc61c149dd","unresolved":true,"context_lines":[{"line_number":768,"context_line":"        actual_hosts \u003d db.get_hosts_mapped_with_segments(ctx)"},{"line_number":769,"context_line":"        self.assertEqual(hosts, actual_hosts)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"    def test_get_all_hosts_mapped_with_segments_agent_type_filter(self):"},{"line_number":772,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":773,"context_line":"        hosts \u003d set()"},{"line_number":774,"context_line":"        with self.network() as network:"}],"source_content_type":"text/x-python","patch_set":5,"id":"8cbe1936_d82215e8","line":771,"range":{"start_line":771,"start_character":8,"end_line":771,"end_character":65},"updated":"2023-10-25 07:18:08.000000000","message":"Added this test here in part to hightlight that when we use any agent filter, hosts without agents are excluded from results when using any agent_type filtering. Also added a not regarding this to the doc string for `get_hosts_mapped_with_segments`.","commit_id":"fc95a98d88822c64b212090b54f6af433a0410df"}]}
