)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3bac1e1254e5c44016ef055347a25aecffecc9de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"093cb1f4_70dcb979","updated":"2026-09-28 13:59:33.000000000","message":"This patch fixes the described error but keeps the existing design problem: the `ml2_*_allocations` tables are redundant. We already have a single table `networksegments` that is enough to calculate the existing (allocated) segments and the needed ones (retrieving the existing ones and checking with the segments configured)","commit_id":"8c65435094f4c01fa9ebaf8e49364cc82e47154a"}],"neutron/db/migration/alembic_migrations/versions/2026.2/expand/d85f18f57f0d_index_network_segment_allocations.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3bac1e1254e5c44016ef055347a25aecffecc9de","unresolved":false,"context_lines":[{"line_number":35,"context_line":"def upgrade():"},{"line_number":36,"context_line":"    inspect \u003d sa.inspect(op.get_bind())"},{"line_number":37,"context_line":"    for index in inspect.get_indexes(TABLE_NAME):"},{"line_number":38,"context_line":"        if index[\u0027name\u0027] \u003d\u003d INDEX_NAME:"},{"line_number":39,"context_line":"            # The index already exists."},{"line_number":40,"context_line":"            return"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"eaa25fee_9d51c6de","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":39},"updated":"2026-09-28 13:59:33.000000000","message":"nice! this upgrade is idempotent, as expected","commit_id":"8c65435094f4c01fa9ebaf8e49364cc82e47154a"}],"neutron/objects/plugins/ml2/base.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3bac1e1254e5c44016ef055347a25aecffecc9de","unresolved":true,"context_lines":[{"line_number":72,"context_line":"                allocated\u003dFalse, **model_filters).all()"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @classmethod"},{"line_number":75,"context_line":"    def _network_segment_exists_clause(cls, network_id\u003dNone, **segment):"},{"line_number":76,"context_line":"        \"\"\"EXISTS clause: is this segment identity used by a network segment?"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        ``network_id``, when given, is the network the segment is being"}],"source_content_type":"text/x-python","patch_set":4,"id":"0704a257_317d876b","line":75,"range":{"start_line":75,"start_character":44,"end_line":75,"end_character":59},"updated":"2026-09-28 13:59:33.000000000","message":"`network_id` is always passed to this method, make it possitional","commit_id":"8c65435094f4c01fa9ebaf8e49364cc82e47154a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3bac1e1254e5c44016ef055347a25aecffecc9de","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            segment[cls.db_model.get_segmentation_id().name]]"},{"line_number":89,"context_line":"        if network_id:"},{"line_number":90,"context_line":"            clauses.append("},{"line_number":91,"context_line":"                segment_model.NetworkSegment.network_id !\u003d network_id)"},{"line_number":92,"context_line":"        return sa.exists().where(sa.and_(*clauses))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"e8e7baf9_f98d2dcb","line":91,"range":{"start_line":91,"start_character":16,"end_line":91,"end_character":69},"updated":"2026-09-28 13:59:33.000000000","message":"no action: it took me a while to understand this part, maybe other people will have the same problem","commit_id":"8c65435094f4c01fa9ebaf8e49364cc82e47154a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3bac1e1254e5c44016ef055347a25aecffecc9de","unresolved":true,"context_lines":[{"line_number":92,"context_line":"        return sa.exists().where(sa.and_(*clauses))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @classmethod"},{"line_number":95,"context_line":"    def network_segment_exists(cls, context, network_id\u003dNone, **segment):"},{"line_number":96,"context_line":"        \"\"\"Is this segment identity used by an existing network segment?\"\"\""},{"line_number":97,"context_line":"        with cls.db_context_reader(context):"},{"line_number":98,"context_line":"            return context.session.query(cls._network_segment_exists_clause("}],"source_content_type":"text/x-python","patch_set":4,"id":"819f1cef_80806ea6","line":95,"range":{"start_line":95,"start_character":45,"end_line":95,"end_character":60},"updated":"2026-09-28 13:59:33.000000000","message":"ditto: `network_id` is always passed to this method, make it possitional","commit_id":"8c65435094f4c01fa9ebaf8e49364cc82e47154a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3bac1e1254e5c44016ef055347a25aecffecc9de","unresolved":true,"context_lines":[{"line_number":106,"context_line":"        not be allocated. A register found available while a network segment"},{"line_number":107,"context_line":"        holds its segmentation ID is repaired, not allocated."},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        with cls.db_context_writer(context):"},{"line_number":110,"context_line":"            exists \u003d cls._network_segment_exists_clause(network_id, **segment)"},{"line_number":111,"context_line":"            query \u003d context.session.query(cls.db_model).filter_by("},{"line_number":112,"context_line":"                allocated\u003dFalse, **segment)"}],"source_content_type":"text/x-python","patch_set":4,"id":"30c8e6a4_caed4b7e","line":109,"range":{"start_line":109,"start_character":8,"end_line":109,"end_character":44},"updated":"2026-09-28 13:59:33.000000000","message":"nit: use the method decorator","commit_id":"8c65435094f4c01fa9ebaf8e49364cc82e47154a"}]}
