)]}'
{"neutron/db/ipam_backend_mixin.py":[{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"db6a4eb0b5f7b60852694872af9d34d6a79d2d3b","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                    segment_id not in associated_segments):"},{"line_number":335,"context_line":"                raise segment_exc.SubnetSegmentAssociationChangeNotAllowed()"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"            query \u003d context.session.query(segment_model.NetworkSegment.id)"},{"line_number":338,"context_line":"            query \u003d query.filter("},{"line_number":339,"context_line":"                segment_model.NetworkSegment.network_id \u003d\u003d network_id)"},{"line_number":340,"context_line":"            if query.count() \u003e 1:"},{"line_number":341,"context_line":"                raise segment_exc.NoUpdateSubnetWhenMultipleSegmentsOnNetwork("},{"line_number":342,"context_line":"                    network_id\u003dnetwork_id)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        if segment_id:"},{"line_number":345,"context_line":"            segment \u003d network_obj.NetworkSegment.get_object(context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_a092e5fa","side":"PARENT","line":342,"range":{"start_line":337,"start_character":12,"end_line":342,"end_character":42},"updated":"2018-07-06 10:24:49.000000000","message":"The patch has just been updated to also cover this new change.","commit_id":"d78664321482c15981a09642985a540195e754e3"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"a02df203954cb387e469bb9b84a1417676b1011b","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # The host is known. Consider both routed and non-routed networks"},{"line_number":701,"context_line":"        results \u003d ("},{"line_number":702,"context_line":"            network_obj.SegmentHostMapping.query_filter_by_segment_and_host("},{"line_number":703,"context_line":"                query, host))"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        # For now, we\u0027re using a simplifying assumption that a host will only"},{"line_number":706,"context_line":"        # touch one segment in a given routed network.  Raise exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_36eb7612","line":703,"range":{"start_line":703,"start_character":16,"end_line":703,"end_character":21},"updated":"2018-07-06 20:03:16.000000000","message":"I somehow feel this is an imperfect OVO method because it takes a raw db query as inputs and returns a raw db query result. Neither inputs nor outputs are OVO. My feeling is that this OVO method should (i) take network_id, service_type, host, or other parameters as inputs, (ii) construct a db query under the hook, (iii) return a subnet versioned objects as output. As a result, this method would be more robust for upgrade. Thoughts?","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"daa87959bbd48c466c63e4a81df3e12fa2e06b8a","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # The host is known. Consider both routed and non-routed networks"},{"line_number":701,"context_line":"        results \u003d ("},{"line_number":702,"context_line":"            network_obj.SegmentHostMapping.query_filter_by_segment_and_host("},{"line_number":703,"context_line":"                query, host))"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        # For now, we\u0027re using a simplifying assumption that a host will only"},{"line_number":706,"context_line":"        # touch one segment in a given routed network.  Raise exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_6b6c819c","line":703,"range":{"start_line":703,"start_character":16,"end_line":703,"end_character":21},"in_reply_to":"5f7c97a3_266d6066","updated":"2018-07-20 08:11:57.000000000","message":"I agree with Honbing on the possible solution to move the entire \u0027_find_candidate_subnets\u0027 into OVO. Only moving _query_filter_by_segment_host_mapping() in object/network.py and keeping it taking in and returning query is totally the opposite of what OVO is meant for. \n\nAlso I would recommend investigating more to see if we could override get_objects() in either SegmentHostMapping or Subnet to deal with outerjoins, because it only joins two tables, which should be easy to handle.","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"5433d767ec09afa735a8de7b6aba8fe42b770c6b","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # The host is known. Consider both routed and non-routed networks"},{"line_number":701,"context_line":"        results \u003d ("},{"line_number":702,"context_line":"            network_obj.SegmentHostMapping.query_filter_by_segment_and_host("},{"line_number":703,"context_line":"                query, host))"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        # For now, we\u0027re using a simplifying assumption that a host will only"},{"line_number":706,"context_line":"        # touch one segment in a given routed network.  Raise exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_db4fbebb","line":703,"range":{"start_line":703,"start_character":16,"end_line":703,"end_character":21},"in_reply_to":"5f7c97a3_36eb7612","updated":"2018-07-09 04:02:58.000000000","message":"Yes, your observation is totally correct!\n\n\nOur Upgrade Team are still thinking about a better way to do this.\nIn the meantime, as the discussion in weekly IRC meeting [1], in order to avoid blocking the delivery of OVO, we decided to move joins to object and add corresponding TODO for it.\nI\u0027ve just updated TODO for this as well.\n\nIf you have any other idea, please don\u0027t hesitate to share with us. Thank you very much.\n\n\n[1] http://eavesdrop.openstack.org/meetings/neutron_upgrades/2018/neutron_upgrades.2018-06-28-14.00.log.html","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"576e2edddbd2393179cc246b54e95435db968047","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # The host is known. Consider both routed and non-routed networks"},{"line_number":701,"context_line":"        results \u003d ("},{"line_number":702,"context_line":"            network_obj.SegmentHostMapping.query_filter_by_segment_and_host("},{"line_number":703,"context_line":"                query, host))"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        # For now, we\u0027re using a simplifying assumption that a host will only"},{"line_number":706,"context_line":"        # touch one segment in a given routed network.  Raise exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_58ac06ea","line":703,"range":{"start_line":703,"start_character":16,"end_line":703,"end_character":21},"in_reply_to":"5f7c97a3_6b6c819c","updated":"2018-08-01 06:44:00.000000000","message":"Thanks, I\u0027ve just moved the entire \u0027_find_candidate_subnets\u0027 into OVO as the suggestion from you and Hongbin.","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"7b4fce828f877202e22fe578b333af3182ec972d","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # The host is known. Consider both routed and non-routed networks"},{"line_number":701,"context_line":"        results \u003d ("},{"line_number":702,"context_line":"            network_obj.SegmentHostMapping.query_filter_by_segment_and_host("},{"line_number":703,"context_line":"                query, host))"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        # For now, we\u0027re using a simplifying assumption that a host will only"},{"line_number":706,"context_line":"        # touch one segment in a given routed network.  Raise exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_266d6066","line":703,"range":{"start_line":703,"start_character":16,"end_line":703,"end_character":21},"in_reply_to":"5f7c97a3_dada4e48","updated":"2018-07-10 01:16:07.000000000","message":"Hi Hongbin Lu,\nThank you very much.\nWe\u0027ll continue trying to figure out the proper way to deal with these join queries.\nHave a great day ahead :)","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"de7c11bbf0659cedb58c946e1f2ce62792a1bbe0","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # The host is known. Consider both routed and non-routed networks"},{"line_number":701,"context_line":"        results \u003d ("},{"line_number":702,"context_line":"            network_obj.SegmentHostMapping.query_filter_by_segment_and_host("},{"line_number":703,"context_line":"                query, host))"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        # For now, we\u0027re using a simplifying assumption that a host will only"},{"line_number":706,"context_line":"        # touch one segment in a given routed network.  Raise exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_dada4e48","line":703,"range":{"start_line":703,"start_character":16,"end_line":703,"end_character":21},"in_reply_to":"5f7c97a3_db4fbebb","updated":"2018-07-09 14:12:29.000000000","message":"My intuition is to move the entire \u0027_find_candidate_subnets\u0027 method into OVO. This method will take etwork_id, host, service_type, fixed_configured as inputs and return subnet versioned object as output. However, I am totally fine to leave it with a TODO.","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"8783accc5c06e84561fa470b7c936775f98740eb","unresolved":false,"context_lines":[{"line_number":614,"context_line":"                subnet_dicts,"},{"line_number":615,"context_line":"                key\u003dlambda subnet: not subnet.get(\u0027service_types\u0027))"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"        # Determine why we found no subnets to raise the right error"},{"line_number":618,"context_line":"        query \u003d subnet_obj.Subnet.query_subnets_on_network(context, network_id)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        if subnet_obj.Subnet.is_host_set(host):"},{"line_number":621,"context_line":"            # Empty because host isn\u0027t mapped to a segment with a subnet?"},{"line_number":622,"context_line":"            s_query \u003d query.filter(models_v2.Subnet.segment_id.isnot(None))"},{"line_number":623,"context_line":"            if s_query.limit(1).count() !\u003d 0:"},{"line_number":624,"context_line":"                # It is a routed network but no subnets found for host"},{"line_number":625,"context_line":"                raise segment_exc.HostNotConnectedToAnySegment("},{"line_number":626,"context_line":"                    host\u003dhost, network_id\u003dnetwork_id)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        if not query.limit(1).count():"},{"line_number":629,"context_line":"            # Network has *no* subnets of any kind. This isn\u0027t an error."},{"line_number":630,"context_line":"            return []"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        # Does filtering ineligible service subnets makes the list empty?"},{"line_number":633,"context_line":"        query \u003d subnet_obj.SubnetServiceType.query_filter_service_subnets("},{"line_number":634,"context_line":"            query, service_type)"},{"line_number":635,"context_line":"        if query.limit(1).count():"},{"line_number":636,"context_line":"            # No, must be a deferred IP port because there are matching"},{"line_number":637,"context_line":"            # subnets. Happens on routed networks when host isn\u0027t known."},{"line_number":638,"context_line":"            raise ipam_exceptions.DeferIpam()"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"        raise ipam_exceptions.IpAddressGenerationFailureNoMatchingSubnet("},{"line_number":641,"context_line":"            network_id\u003dnetwork_id, service_type\u003dservice_type)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_46241c0e","line":638,"range":{"start_line":617,"start_character":0,"end_line":638,"end_character":45},"updated":"2018-08-01 15:39:23.000000000","message":"Ideally, we can move this to OVO as well. I imagine the code will be something like (untested):\n\n    if subnet_obj.Subnet.network_has_no_subnet(\n            context, network_id, host, service_type):\n        return []\n\n\n    class Subnet(base.NeutronDbObject):\n        ...\n\n        @classmethod\n        def network_has_no_subnet(cls, context, network_id, host, service_type):\n            # Determine why we found no subnets to raise the right error\n            query \u003d cls.db_model.query_subnets_on_network(context, network_id)\n\n            if cls.db_model.is_host_set(host):\n                # Empty because host isn\u0027t mapped to a segment with a subnet?\n                s_query \u003d query.filter(models_v2.Subnet.segment_id.isnot(None))\n                if s_query.limit(1).count() !\u003d 0:\n                    # It is a routed network but no subnets found for host\n                    raise segment_exc.HostNotConnectedToAnySegment(\n                        host\u003dhost, network_id\u003dnetwork_id)\n\n            if not query.limit(1).count():\n                # Network has *no* subnets of any kind. This isn\u0027t an error.\n                return True\n\n            # Does filtering ineligible service subnets makes the list empty?\n            query \u003d SubnetServiceType.query_filter_service_subnets(\n                query, service_type)\n            if query.limit(1).count():\n                # No, must be a deferred IP port because there are matching\n                # subnets. Happens on routed networks when host isn\u0027t known.\n                raise ipam_exceptions.DeferIpam()\n\n            return False","commit_id":"452b038c99c8a02f877ee08cddf6b30f5cc5ec62"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"88ec5a7eb0d03cfbc94c707ca8c7e12f93811d70","unresolved":false,"context_lines":[{"line_number":614,"context_line":"                subnet_dicts,"},{"line_number":615,"context_line":"                key\u003dlambda subnet: not subnet.get(\u0027service_types\u0027))"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"        # Determine why we found no subnets to raise the right error"},{"line_number":618,"context_line":"        query \u003d subnet_obj.Subnet.query_subnets_on_network(context, network_id)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        if subnet_obj.Subnet.is_host_set(host):"},{"line_number":621,"context_line":"            # Empty because host isn\u0027t mapped to a segment with a subnet?"},{"line_number":622,"context_line":"            s_query \u003d query.filter(models_v2.Subnet.segment_id.isnot(None))"},{"line_number":623,"context_line":"            if s_query.limit(1).count() !\u003d 0:"},{"line_number":624,"context_line":"                # It is a routed network but no subnets found for host"},{"line_number":625,"context_line":"                raise segment_exc.HostNotConnectedToAnySegment("},{"line_number":626,"context_line":"                    host\u003dhost, network_id\u003dnetwork_id)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        if not query.limit(1).count():"},{"line_number":629,"context_line":"            # Network has *no* subnets of any kind. This isn\u0027t an error."},{"line_number":630,"context_line":"            return []"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        # Does filtering ineligible service subnets makes the list empty?"},{"line_number":633,"context_line":"        query \u003d subnet_obj.SubnetServiceType.query_filter_service_subnets("},{"line_number":634,"context_line":"            query, service_type)"},{"line_number":635,"context_line":"        if query.limit(1).count():"},{"line_number":636,"context_line":"            # No, must be a deferred IP port because there are matching"},{"line_number":637,"context_line":"            # subnets. Happens on routed networks when host isn\u0027t known."},{"line_number":638,"context_line":"            raise ipam_exceptions.DeferIpam()"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"        raise ipam_exceptions.IpAddressGenerationFailureNoMatchingSubnet("},{"line_number":641,"context_line":"            network_id\u003dnetwork_id, service_type\u003dservice_type)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_f4e2a401","line":638,"range":{"start_line":617,"start_character":0,"end_line":638,"end_character":45},"in_reply_to":"5f7c97a3_46241c0e","updated":"2018-08-02 07:14:31.000000000","message":"Hi Hongbin,\nThanks a lot!\nThe patch has just been updated as your suggestion.\nI really appreciate your great help.\nWish you have a great day :)","commit_id":"452b038c99c8a02f877ee08cddf6b30f5cc5ec62"}],"neutron/objects/network.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"93873c397603bd07be7edb473407734c04c4b62e","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    primary_keys \u003d [\u0027segment_id\u0027, \u0027host\u0027]"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    @classmethod"},{"line_number":337,"context_line":"    def query_filter_by_segment_and_host(cls, query, host):"},{"line_number":338,"context_line":"        \"\"\"Excludes subnets on segments not reachable by the host"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        The query gets two kinds of subnets: those that are on segments that"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_d0285435","line":337,"updated":"2018-04-19 14:39:24.000000000","message":"we shouldn\u0027t pass queries / models into / from OVO methods. ideally, we expand get_object[s] to support extra filters we may need.","commit_id":"1c165661d2a6943353d6e472357462b3a8ffde4c"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"29a17899acba3a4e57fcae4bd9b0b8956d7d0ae5","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                                      SegmentHostMapping.host.isnot(None)),"},{"line_number":362,"context_line":"                                 and_(Subnet.segment_id.is_(None),"},{"line_number":363,"context_line":"                                      SegmentHostMapping.host.is_(None))))"},{"line_number":364,"context_line":"        return query.all()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"@base.NeutronObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b8819afd","line":364,"range":{"start_line":364,"start_character":8,"end_line":364,"end_character":26},"updated":"2018-05-31 21:32:20.000000000","message":"its not really an object ? I guess it should prepare object and send it and other changes may be needed for using it.","commit_id":"1c165661d2a6943353d6e472357462b3a8ffde4c"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"189a83a3192a8c0bc5105ce9408ef258a62486e8","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                                      SegmentHostMapping.host.isnot(None)),"},{"line_number":362,"context_line":"                                 and_(Subnet.segment_id.is_(None),"},{"line_number":363,"context_line":"                                      SegmentHostMapping.host.is_(None))))"},{"line_number":364,"context_line":"        return query.all()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"@base.NeutronObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_26acb2ec","line":364,"range":{"start_line":364,"start_character":8,"end_line":364,"end_character":26},"in_reply_to":"5f7c97a3_b8819afd","updated":"2018-07-06 07:01:04.000000000","message":"Hi Manjeet,\nThanks for your interest in Neutron OVO.\n\n\nOur Upgrade Team are still thinking about a better way to do this.\nIn the meantime, as the discussion in weekly IRC meeting [1], in order to avoid blocking the delivery of OVO, we decided to move joins to object and add corresponding TODO for it.\n\nIf you have any idea, please don\u0027t hesitate to share with us. Thank you very much.\n\n\n[1] http://eavesdrop.openstack.org/meetings/neutron_upgrades/2018/neutron_upgrades.2018-06-28-14.00.log.html","commit_id":"1c165661d2a6943353d6e472357462b3a8ffde4c"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"71f22f26ca39464b3f5d1797500e9c0be78cdad4","unresolved":false,"context_lines":[{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    @classmethod"},{"line_number":337,"context_line":"    def query_filter_by_segment_and_host(cls, query, host):"},{"line_number":338,"context_line":"        # TODO(tuanvu): find OVO-like solution for handling \"join queries\""},{"line_number":339,"context_line":"        \"\"\"Excludes subnets on segments not reachable by the host"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        The query gets two kinds of subnets: those that are on segments that"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_460d2e33","line":338,"range":{"start_line":338,"start_character":8,"end_line":338,"end_character":74},"updated":"2018-07-06 06:51:58.000000000","message":"Hi Luo-san and Nate,\nAs the discussion in IRC meeting, in order to avoid blocking the delivery of OVO, I\u0027ve moved joins to object and add corresponding TODO for it.\nIf you have any other suggestions, please don\u0027t hesitate to let me know.\nThank you in advance :)","commit_id":"6ec91110214e29ecd07bd9245c660dff6ad0a1d2"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"a02df203954cb387e469bb9b84a1417676b1011b","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        *cannot* reach are excluded."},{"line_number":345,"context_line":"        \"\"\""},{"line_number":346,"context_line":"        Subnet \u003d models_v2.Subnet"},{"line_number":347,"context_line":"        SegmentHostMapping \u003d segment_model.SegmentHostMapping"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        # A host has been provided.  Consider these two scenarios"},{"line_number":350,"context_line":"        # 1. Not a routed network:  subnets are not on segments"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_9375bcce","line":347,"range":{"start_line":347,"start_character":8,"end_line":347,"end_character":26},"updated":"2018-07-06 20:03:16.000000000","message":"Is it duplicated with db_model as line #327?","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"5433d767ec09afa735a8de7b6aba8fe42b770c6b","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        *cannot* reach are excluded."},{"line_number":345,"context_line":"        \"\"\""},{"line_number":346,"context_line":"        Subnet \u003d models_v2.Subnet"},{"line_number":347,"context_line":"        SegmentHostMapping \u003d segment_model.SegmentHostMapping"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        # A host has been provided.  Consider these two scenarios"},{"line_number":350,"context_line":"        # 1. Not a routed network:  subnets are not on segments"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5bc96e22","line":347,"range":{"start_line":347,"start_character":8,"end_line":347,"end_character":26},"in_reply_to":"5f7c97a3_9375bcce","updated":"2018-07-09 04:02:58.000000000","message":"Yes, it is.\nThank you for the good catch!","commit_id":"824a630782d7c313f92cd1916ed8c9ee8121a770"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"597bbea862d8940b9ffd94d97bcf334f6d79ca4a","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    primary_keys \u003d [\u0027segment_id\u0027, \u0027host\u0027]"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    @classmethod"},{"line_number":337,"context_line":"    def query_filter_by_segment_and_host(cls, query, host):"},{"line_number":338,"context_line":"        # TODO(tuanvu): find OVO-like solution for handling \"join queries\""},{"line_number":339,"context_line":"        \"\"\"Excludes subnets on segments not reachable by the host"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_058ca77e","line":337,"updated":"2018-07-11 19:09:08.000000000","message":"Since this is not returning the query string back anymore, I would probably name this function just \"filter_by_segment_and_host\".  That keeps it in line with other functions in OVO.","commit_id":"a711810946b2b4a1f8614616c79c372f66c9f42b"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"b369f25645c5f4cbba4f743cd8b0e2649967114d","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                                      cls.db_model.host.isnot(None)),"},{"line_number":362,"context_line":"                                 and_(Subnet.segment_id.is_(None),"},{"line_number":363,"context_line":"                                      cls.db_model.host.is_(None))))"},{"line_number":364,"context_line":"        return query.all()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"@base.NeutronObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_cb035575","line":364,"range":{"start_line":364,"start_character":15,"end_line":364,"end_character":26},"updated":"2018-07-20 08:24:48.000000000","message":"Also even if we have to move the entire method here. Shouldn\u0027t it be \"query\" here?","commit_id":"a711810946b2b4a1f8614616c79c372f66c9f42b"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"576e2edddbd2393179cc246b54e95435db968047","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                                      cls.db_model.host.isnot(None)),"},{"line_number":362,"context_line":"                                 and_(Subnet.segment_id.is_(None),"},{"line_number":363,"context_line":"                                      cls.db_model.host.is_(None))))"},{"line_number":364,"context_line":"        return query.all()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"@base.NeutronObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_b8767a91","line":364,"range":{"start_line":364,"start_character":15,"end_line":364,"end_character":26},"in_reply_to":"5f7c97a3_cb035575","updated":"2018-08-01 06:44:00.000000000","message":"Yes, thanks for pointing this out.","commit_id":"a711810946b2b4a1f8614616c79c372f66c9f42b"}],"neutron/objects/subnet.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9ccd00faddbc5b026957edbcf4c1ff2474f5b2c1","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    @classmethod"},{"line_number":333,"context_line":"    def _query_filter_by_segment_host_mapping(cls, query, host):"},{"line_number":334,"context_line":"        # TODO(tuanvu): find OVO-like solution for handling \"join queries\" and"},{"line_number":335,"context_line":"        #               write unit test for this function"},{"line_number":336,"context_line":"        \"\"\"Excludes subnets on segments not reachable by the host"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        The query gets two kinds of subnets: those that are on segments that"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_c6cb241c","line":335,"updated":"2018-08-05 19:45:29.000000000","message":"why You don\u0027t write UT in this patch?","commit_id":"faa4438daea289af869ff12c19bd53d75ab3225e"},{"author":{"_account_id":25903,"name":"Vu Cong Tuan","email":"tuanvc@vn.fujitsu.com","username":"tuanvu"},"change_message_id":"402305087e163dc217df63d653cc08b28cfe7cd3","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    @classmethod"},{"line_number":333,"context_line":"    def _query_filter_by_segment_host_mapping(cls, query, host):"},{"line_number":334,"context_line":"        # TODO(tuanvu): find OVO-like solution for handling \"join queries\" and"},{"line_number":335,"context_line":"        #               write unit test for this function"},{"line_number":336,"context_line":"        \"\"\"Excludes subnets on segments not reachable by the host"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        The query gets two kinds of subnets: those that are on segments that"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_ccd7c523","line":335,"in_reply_to":"3f79a3b5_c6cb241c","updated":"2018-08-06 02:48:15.000000000","message":"Hi Slawek,\nThanks for your reviews.\n\nOur Upgrade Team are still thinking about a better way to do this.\nIn the meantime, as the discussion in weekly IRC meeting [1], in order to avoid blocking the delivery of OVO, we decided to move joins to object and add corresponding TODO for it.\n\nIf you have any idea, please don\u0027t hesitate to share with us. Thank you very much.\n\n\n[1] http://eavesdrop.openstack.org/meetings/neutron_upgrades/2018/neutron_upgrades.2018-06-28-14.00.log.html","commit_id":"faa4438daea289af869ff12c19bd53d75ab3225e"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"9da2530012b2e27c2b3c7c69c9676556ffa46441","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    @classmethod"},{"line_number":333,"context_line":"    def _query_filter_by_segment_host_mapping(cls, query, host):"},{"line_number":334,"context_line":"        # TODO(tuanvu): find OVO-like solution for handling \"join queries\" and"},{"line_number":335,"context_line":"        #               write unit test for this function"},{"line_number":336,"context_line":"        \"\"\"Excludes subnets on segments not reachable by the host"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        The query gets two kinds of subnets: those that are on segments that"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_80c5b75d","line":335,"in_reply_to":"3f79a3b5_ccd7c523","updated":"2018-08-09 13:05:13.000000000","message":"If possible, I think we can at least include a UT for it in this patch, as we are at the end of this cycle thus probably we will delay this patch to next cycle, we still have time to work on it.","commit_id":"faa4438daea289af869ff12c19bd53d75ab3225e"}]}
