)]}'
{"neutron/db/ipam_backend_mixin.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"9a1097fd6f30bdae0802c8acc17801725d1e77d3","unresolved":false,"context_lines":[{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        raise ipam_exceptions.IpAddressGenerationFailureNoMatchingSubnet()"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def _find_candidate_subnets(self, context, network_id, host, service_type):"},{"line_number":637,"context_line":"        \"\"\"Find canditate subnets for the network, host, and service_type\"\"\""},{"line_number":638,"context_line":"        query \u003d self._query_subnets_on_network(context, network_id)"},{"line_number":639,"context_line":"        query \u003d self._query_filter_service_subnets(query, service_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_b08479d4","line":636,"range":{"start_line":636,"start_character":8,"end_line":636,"end_character":31},"updated":"2016-09-15 11:30:15.000000000","message":"This method should return Subnet objects. We should move all query builder functions to Subnet OVO and figure out the mechanism to evaluate the resulting query in Subnet object file. It can be done in this or separate patch.","commit_id":"65790ca5bd886f93ab8b4ce36e92ecb230da4f3e"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"a96d00a794b04791e4e0fffe611b35ead185c999","unresolved":false,"context_lines":[{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        raise ipam_exceptions.IpAddressGenerationFailureNoMatchingSubnet()"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def _find_candidate_subnets(self, context, network_id, host, service_type):"},{"line_number":637,"context_line":"        \"\"\"Find canditate subnets for the network, host, and service_type\"\"\""},{"line_number":638,"context_line":"        query \u003d self._query_subnets_on_network(context, network_id)"},{"line_number":639,"context_line":"        query \u003d self._query_filter_service_subnets(query, service_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_faab421c","line":636,"range":{"start_line":636,"start_character":8,"end_line":636,"end_character":31},"in_reply_to":"7a8ec9b2_b08479d4","updated":"2016-09-21 03:44:22.000000000","message":"separate patch would be better as it closely related to subnet ovo","commit_id":"65790ca5bd886f93ab8b4ce36e92ecb230da4f3e"}],"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":"eb916bb63c9f80256489487733139cb70a294f75","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    }"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    primary_keys \u003d [\u0027segment_id\u0027, \u0027host\u0027]"},{"line_number":237,"context_line":"    foreign_keys \u003d {\u0027NetworkSegment\u0027: {\u0027segment_id\u0027: \u0027id\u0027}}"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_fb24fdc5","line":237,"updated":"2016-10-13 14:34:27.000000000","message":"I believe that line is needed only if you plan to expose that object through a [ListOf]ObjectField on NetworkSegment. This patch does not do it. So I doubt the line is needed (now).","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"d15a2278e9053342ea92e2ffbbd918f2986e9849","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    }"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    primary_keys \u003d [\u0027segment_id\u0027, \u0027host\u0027]"},{"line_number":237,"context_line":"    foreign_keys \u003d {\u0027NetworkSegment\u0027: {\u0027segment_id\u0027: \u0027id\u0027}}"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_15232aa8","line":237,"in_reply_to":"fa6399be_fb24fdc5","updated":"2016-10-13 21:49:31.000000000","message":"Done","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"}],"neutron/objects/network/segment_host_mapping.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"16478fc393bd6d632666e3c9ef43d5fc2d144b2c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    }"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    primary_keys \u003d [\u0027segment_id\u0027, \u0027host\u0027]"},{"line_number":35,"context_line":"    foreign_keys \u003d {\u0027segment_id\u0027: \u0027id\u0027}"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_e496264b","line":35,"updated":"2016-09-12 19:50:38.000000000","message":"foreign_keys \u003d {\u0027NetworkSegment\u0027: {\u0027segment_id\u0027: \u0027id\u0027}}","commit_id":"1340a33536b463fa3a77598747a4d917e95f4bf9"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"686db7a71d25acdf54be1250b5c9aa38425aa6b6","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    }"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    primary_keys \u003d [\u0027segment_id\u0027, \u0027host\u0027]"},{"line_number":35,"context_line":"    foreign_keys \u003d {\u0027segment_id\u0027: \u0027id\u0027}"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_70cd6c30","line":35,"in_reply_to":"9a89bdaa_e496264b","updated":"2016-09-12 21:08:54.000000000","message":"Done","commit_id":"1340a33536b463fa3a77598747a4d917e95f4bf9"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"9a1097fd6f30bdae0802c8acc17801725d1e77d3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"7a8ec9b2_7a30129f","updated":"2016-09-15 11:30:15.000000000","message":"the neutron/objects/network dir is going to be removed in patch [1]. You can add SegmentHostMapping object to neutron/objects/network.py file.\n\n[1] https://review.openstack.org/#/c/269658","commit_id":"65790ca5bd886f93ab8b4ce36e92ecb230da4f3e"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"a96d00a794b04791e4e0fffe611b35ead185c999","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"7a8ec9b2_7a049d7d","in_reply_to":"7a8ec9b2_7a30129f","updated":"2016-09-21 03:44:22.000000000","message":"Done","commit_id":"65790ca5bd886f93ab8b4ce36e92ecb230da4f3e"}],"neutron/objects/subnet.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"c3f7352f9b5c4af731cf7a29c0e542c1cdf1b699","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                                      SegmentHostMapping.host.isnot(None)),"},{"line_number":271,"context_line":"                                 and_(Subnet.segment_id.is_(None),"},{"line_number":272,"context_line":"                                      SegmentHostMapping.host.is_(None))))"},{"line_number":273,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_9a43c56b","line":273,"range":{"start_line":273,"start_character":15,"end_line":273,"end_character":20},"updated":"2016-09-16 18:39:58.000000000","message":"Given that this is an OVO method you should convert the result of the query to a list of OVO instances like the base class[1]\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/objects/base.py#L464","commit_id":"65790ca5bd886f93ab8b4ce36e92ecb230da4f3e"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"a96d00a794b04791e4e0fffe611b35ead185c999","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                                      SegmentHostMapping.host.isnot(None)),"},{"line_number":271,"context_line":"                                 and_(Subnet.segment_id.is_(None),"},{"line_number":272,"context_line":"                                      SegmentHostMapping.host.is_(None))))"},{"line_number":273,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_9d024308","line":273,"range":{"start_line":273,"start_character":15,"end_line":273,"end_character":20},"in_reply_to":"7a8ec9b2_9a43c56b","updated":"2016-09-21 03:44:22.000000000","message":"Did not follow this comment .Can you please elaborate?","commit_id":"65790ca5bd886f93ab8b4ce36e92ecb230da4f3e"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"6376f5aa5e876c5740eccb1c045365a5c3e79404","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                                      SegmentHostMapping.host.isnot(None)),"},{"line_number":271,"context_line":"                                 and_(Subnet.segment_id.is_(None),"},{"line_number":272,"context_line":"                                      SegmentHostMapping.host.is_(None))))"},{"line_number":273,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_3e666c29","line":273,"range":{"start_line":273,"start_character":15,"end_line":273,"end_character":20},"in_reply_to":"7a8ec9b2_9d024308","updated":"2016-09-21 09:38:40.000000000","message":"We should consider, if this method should return SQL query or OVO. For me, in this patch we can have the query returned, but follow-up patch should make it return object.","commit_id":"65790ca5bd886f93ab8b4ce36e92ecb230da4f3e"}],"neutron/scheduler/dhcp_agent_scheduler.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from neutron.db import api as db_api"},{"line_number":29,"context_line":"from neutron.db.network_dhcp_agent_binding import models as ndab_model"},{"line_number":30,"context_line":"from neutron.extensions import availability_zone as az_ext"},{"line_number":31,"context_line":"from neutron.objects import network as obj_segmenthostmapping"},{"line_number":32,"context_line":"from neutron.scheduler import base_resource_filter"},{"line_number":33,"context_line":"from neutron.scheduler import base_scheduler"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_8e42eb3c","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":61},"updated":"2016-09-21 10:29:48.000000000","message":"you can just import the network and then you it:\nnetwork.SegmentHostMapping.get_objects(...)","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from neutron.db import api as db_api"},{"line_number":29,"context_line":"from neutron.db.network_dhcp_agent_binding import models as ndab_model"},{"line_number":30,"context_line":"from neutron.extensions import availability_zone as az_ext"},{"line_number":31,"context_line":"from neutron.objects import network as obj_segmenthostmapping"},{"line_number":32,"context_line":"from neutron.scheduler import base_resource_filter"},{"line_number":33,"context_line":"from neutron.scheduler import base_scheduler"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_d55ea044","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":61},"in_reply_to":"7a8ec9b2_8e42eb3c","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                 agents_db.Agent.admin_state_up \u003d\u003d sql.true())"},{"line_number":66,"context_line":"            dhcp_agents \u003d query.all()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects("},{"line_number":69,"context_line":"                context, host\u003dhost)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"            segments_on_host \u003d {s.segment_id for s in query}"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_6e5afff3","line":69,"range":{"start_line":68,"start_character":12,"end_line":69,"end_character":35},"updated":"2016-09-21 10:29:48.000000000","message":"it is not query anymore, it should be:\n\nsegment_host_mappings \u003d network.SegmentHostMapping.get_objects(context, host\u003dhost)\nsegments_on_host \u003d {s.segment_id for s in segment_host_mappings}","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                 agents_db.Agent.admin_state_up \u003d\u003d sql.true())"},{"line_number":66,"context_line":"            dhcp_agents \u003d query.all()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects("},{"line_number":69,"context_line":"                context, host\u003dhost)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"            segments_on_host \u003d {s.segment_id for s in query}"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_3556e429","line":69,"range":{"start_line":68,"start_character":12,"end_line":69,"end_character":35},"in_reply_to":"7a8ec9b2_6e5afff3","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ea61df90e820b2f1d78902115ed558e3e4a90d4f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                 agents_db.Agent.admin_state_up \u003d\u003d sql.true())"},{"line_number":66,"context_line":"            dhcp_agents \u003d query.all()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":69,"context_line":"                context, host\u003dhost)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"            segments_on_host \u003d {s.segment_id for s in segment_host_mapping}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            for dhcp_agent in dhcp_agents:"},{"line_number":74,"context_line":"                if agents_db.AgentDbMixin.is_agent_down("}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_1deffdb0","line":71,"range":{"start_line":68,"start_character":12,"end_line":71,"end_character":75},"updated":"2016-10-06 15:12:45.000000000","message":"IMHO, It should be nice to have support for returning specific fields from OVO and not only API.","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"}],"neutron/services/segments/db.py":[{"author":{"_account_id":22218,"name":"Sindhu Devale","email":"sindhu.devale@intel.com","username":"sindhudevale"},"change_message_id":"298a073546e0589cb7ff1f290a25f461bf36dd78","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    L2 providers can use this method to get an overview of SegmentHostMapping,"},{"line_number":213,"context_line":"    and then delete the stale SegmentHostMapping."},{"line_number":214,"context_line":"    \"\"\""},{"line_number":215,"context_line":"    query \u003d context.session.query(segmenthostmapping.SegmentHostMapping.host)"},{"line_number":216,"context_line":"    return {row.host for row in query}"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_1a76d53d","side":"PARENT","line":215,"range":{"start_line":215,"start_character":34,"end_line":215,"end_character":76},"updated":"2016-09-16 18:29:46.000000000","message":"Is this like filtering by host field?","commit_id":"726b665c3db09251a1a49cf5ad418c8804b750e8"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"a96d00a794b04791e4e0fffe611b35ead185c999","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    L2 providers can use this method to get an overview of SegmentHostMapping,"},{"line_number":213,"context_line":"    and then delete the stale SegmentHostMapping."},{"line_number":214,"context_line":"    \"\"\""},{"line_number":215,"context_line":"    query \u003d context.session.query(segmenthostmapping.SegmentHostMapping.host)"},{"line_number":216,"context_line":"    return {row.host for row in query}"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_9d85e35a","side":"PARENT","line":215,"range":{"start_line":215,"start_character":34,"end_line":215,"end_character":76},"in_reply_to":"7a8ec9b2_1a76d53d","updated":"2016-09-21 03:44:22.000000000","message":"nope","commit_id":"726b665c3db09251a1a49cf5ad418c8804b750e8"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from neutron.db import segments_db as db"},{"line_number":35,"context_line":"from neutron.extensions import segment as extension"},{"line_number":36,"context_line":"from neutron import manager"},{"line_number":37,"context_line":"from neutron.objects import network as obj_segmenthostmapping"},{"line_number":38,"context_line":"from neutron.services.segments import exceptions"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"_deprecate._moved_global(\u0027SegmentHostMapping\u0027, new_module\u003dsegmenthostmapping)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_2e50f731","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":61},"updated":"2016-09-21 10:29:48.000000000","message":"Import it as network.","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from neutron.db import segments_db as db"},{"line_number":35,"context_line":"from neutron.extensions import segment as extension"},{"line_number":36,"context_line":"from neutron import manager"},{"line_number":37,"context_line":"from neutron.objects import network as obj_segmenthostmapping"},{"line_number":38,"context_line":"from neutron.services.segments import exceptions"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"_deprecate._moved_global(\u0027SegmentHostMapping\u0027, new_module\u003dsegmenthostmapping)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_359d0466","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":61},"in_reply_to":"7a8ec9b2_2e50f731","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def get_segments_by_hosts(self, context, hosts):"},{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context)"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in query if mapping.host"},{"line_number":166,"context_line":"                     in hosts})"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_f117d242","line":164,"range":{"start_line":163,"start_character":8,"end_line":164,"end_character":20},"updated":"2016-09-21 10:29:48.000000000","message":"It is not query. Also, you can write the filtering with host using get_objects:\n\nshm \u003d network.SegmentHostMapping.get_objects(context, **{\u0027host\u0027: hosts})","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def get_segments_by_hosts(self, context, hosts):"},{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context)"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in query if mapping.host"},{"line_number":166,"context_line":"                     in hosts})"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_55bc506c","line":164,"range":{"start_line":163,"start_character":8,"end_line":164,"end_character":20},"in_reply_to":"7a8ec9b2_f117d242","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"def update_segment_host_mapping(context, host, current_segment_ids):"},{"line_number":194,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":195,"context_line":"        query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects("},{"line_number":196,"context_line":"            context,"},{"line_number":197,"context_line":"            host\u003dhost)"},{"line_number":198,"context_line":"        previous_segment_ids \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_f1eb52da","line":195,"range":{"start_line":195,"start_character":8,"end_line":195,"end_character":13},"updated":"2016-09-21 10:29:48.000000000","message":"Again, please change to segment_host_mappings.","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"def update_segment_host_mapping(context, host, current_segment_ids):"},{"line_number":194,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":195,"context_line":"        query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects("},{"line_number":196,"context_line":"            context,"},{"line_number":197,"context_line":"            host\u003dhost)"},{"line_number":198,"context_line":"        previous_segment_ids \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_f5c71c43","line":195,"range":{"start_line":195,"start_character":8,"end_line":195,"end_character":13},"in_reply_to":"7a8ec9b2_f1eb52da","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    L2 providers can use this method to get an overview of SegmentHostMapping,"},{"line_number":217,"context_line":"    and then delete the stale SegmentHostMapping."},{"line_number":218,"context_line":"    \"\"\""},{"line_number":219,"context_line":"    query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects(context)"},{"line_number":220,"context_line":"    return {row.host for row in query}"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_b1938a5a","line":219,"range":{"start_line":219,"start_character":4,"end_line":219,"end_character":9},"updated":"2016-09-21 10:29:48.000000000","message":"Not a query.","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    L2 providers can use this method to get an overview of SegmentHostMapping,"},{"line_number":217,"context_line":"    and then delete the stale SegmentHostMapping."},{"line_number":218,"context_line":"    \"\"\""},{"line_number":219,"context_line":"    query \u003d obj_segmenthostmapping.SegmentHostMapping.get_objects(context)"},{"line_number":220,"context_line":"    return {row.host for row in query}"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_30043216","line":219,"range":{"start_line":219,"start_character":4,"end_line":219,"end_character":9},"in_reply_to":"7a8ec9b2_b1938a5a","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ea61df90e820b2f1d78902115ed558e3e4a90d4f","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context, **{\u0027host\u0027: hosts})"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in segment_host_mapping})"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_f250c060","line":164,"range":{"start_line":164,"start_character":21,"end_line":164,"end_character":38},"updated":"2016-10-06 15:12:45.000000000","message":"shouldn\u0027t be better this?\n\nsegment_host_mapping \u003d network.SegmentHostMapping.get_objects(\n            context, host\u003dhosts)","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"30851cb8dc12cd7bb94888b173ba10cc7a721ae3","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context, **{\u0027host\u0027: hosts})"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in segment_host_mapping})"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_b52d02aa","line":164,"range":{"start_line":164,"start_character":21,"end_line":164,"end_character":38},"in_reply_to":"1a95cdbc_f250c060","updated":"2016-10-07 20:10:38.000000000","message":"this is a substitute for SQLAlchemy in_ operator.\nafaik host:hosts is not sufficient is to carry out this operation. Please suggest","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ea61df90e820b2f1d78902115ed558e3e4a90d4f","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":194,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":195,"context_line":"            context,"},{"line_number":196,"context_line":"            host\u003dhost)"},{"line_number":197,"context_line":"        previous_segment_ids \u003d {"},{"line_number":198,"context_line":"            seg_host[\u0027segment_id\u0027] for seg_host in segment_host_mapping}"},{"line_number":199,"context_line":"        for segment_id in current_segment_ids - previous_segment_ids:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_f2fe0037","line":196,"range":{"start_line":196,"start_character":12,"end_line":196,"end_character":21},"updated":"2016-10-06 15:12:45.000000000","message":"nit: this can fit in the previous line","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"30851cb8dc12cd7bb94888b173ba10cc7a721ae3","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":194,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":195,"context_line":"            context,"},{"line_number":196,"context_line":"            host\u003dhost)"},{"line_number":197,"context_line":"        previous_segment_ids \u003d {"},{"line_number":198,"context_line":"            seg_host[\u0027segment_id\u0027] for seg_host in segment_host_mapping}"},{"line_number":199,"context_line":"        for segment_id in current_segment_ids - previous_segment_ids:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_30074019","line":196,"range":{"start_line":196,"start_character":12,"end_line":196,"end_character":21},"in_reply_to":"1a95cdbc_f2fe0037","updated":"2016-10-07 20:10:38.000000000","message":"Done","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ea61df90e820b2f1d78902115ed558e3e4a90d4f","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    \"\"\"Map segment to a collection of hosts.\"\"\""},{"line_number":255,"context_line":"    with db_api.autonested_transaction(context.session):"},{"line_number":256,"context_line":"        for host in hosts:"},{"line_number":257,"context_line":"            segmenthostdata \u003d network.SegmentHostMapping("},{"line_number":258,"context_line":"                context,"},{"line_number":259,"context_line":"                segment_id\u003dsegment_id,"},{"line_number":260,"context_line":"                host\u003dhost)"},{"line_number":261,"context_line":"            segmenthostdata.create()"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"def _update_segment_host_mapping_for_agent(resource, event, trigger,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_7da00144","line":261,"range":{"start_line":257,"start_character":12,"end_line":261,"end_character":36},"updated":"2016-10-06 15:12:45.000000000","message":"What about not creating an instance?\n\n            network.SegmentHostMapping(\n                context, segment_id\u003dsegment_id, host\u003dhost).create()","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"30851cb8dc12cd7bb94888b173ba10cc7a721ae3","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    \"\"\"Map segment to a collection of hosts.\"\"\""},{"line_number":255,"context_line":"    with db_api.autonested_transaction(context.session):"},{"line_number":256,"context_line":"        for host in hosts:"},{"line_number":257,"context_line":"            segmenthostdata \u003d network.SegmentHostMapping("},{"line_number":258,"context_line":"                context,"},{"line_number":259,"context_line":"                segment_id\u003dsegment_id,"},{"line_number":260,"context_line":"                host\u003dhost)"},{"line_number":261,"context_line":"            segmenthostdata.create()"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"def _update_segment_host_mapping_for_agent(resource, event, trigger,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_5023eca6","line":261,"range":{"start_line":257,"start_character":12,"end_line":261,"end_character":36},"in_reply_to":"1a95cdbc_7da00144","updated":"2016-10-07 20:10:38.000000000","message":"Done","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"66e62d9fdad629551261402fb412cd97cd740732","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context, **{\u0027host\u0027: hosts})"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in segment_host_mapping})"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_f3ce4082","line":164,"range":{"start_line":164,"start_character":20,"end_line":164,"end_character":38},"updated":"2016-10-11 20:09:23.000000000","message":"SQL Alchemy in_ is now replaced with the get_objects function and the filters get passed to the plugin._get_collections method through the _kwargs_to_filters and it doesn\u0027t matter how you pass the argument, \"**{\u0027host\u0027:hosts}\" and \"host\u003dhosts\" are the same.\n\nhost\u003dhosts should work see example...\n\ndef _kwargs_to_filters(**kwargs):\n    return {k: v if isinstance(v, list) else [v] for k, v in kwargs.items()}\n\nhosts \u003d [\u0027host1\u0027,\u0027host2\u0027,\u0027host3\u0027]\n\nres \u003d _kwargs_to_filters(host\u003dhosts)\nprint(res \u003d\u003d _kwargs_to_filters(**{\u0027host\u0027:hosts}))\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nYour Output (stdout)\nTrue","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"d15a2278e9053342ea92e2ffbbd918f2986e9849","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context, **{\u0027host\u0027: hosts})"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in segment_host_mapping})"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_7532a6f3","line":164,"range":{"start_line":164,"start_character":20,"end_line":164,"end_character":38},"in_reply_to":"fa6399be_1eb8bf29","updated":"2016-10-13 21:49:31.000000000","message":"Done","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"d15a2278e9053342ea92e2ffbbd918f2986e9849","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context, **{\u0027host\u0027: hosts})"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in segment_host_mapping})"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_b54efe6c","line":164,"range":{"start_line":164,"start_character":20,"end_line":164,"end_character":38},"in_reply_to":"fa6399be_f3ce4082","updated":"2016-10-13 21:49:31.000000000","message":"Done","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"eb916bb63c9f80256489487733139cb70a294f75","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if not hosts:"},{"line_number":162,"context_line":"            return []"},{"line_number":163,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":164,"context_line":"            context, **{\u0027host\u0027: hosts})"},{"line_number":165,"context_line":"        return list({mapping.segment_id for mapping in segment_host_mapping})"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_1eb8bf29","line":164,"range":{"start_line":164,"start_character":20,"end_line":164,"end_character":38},"in_reply_to":"fa6399be_f3ce4082","updated":"2016-10-13 14:34:27.000000000","message":"yeah, host\u003dhosts will be a tad cleaner.","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from neutron.extensions import l2_adjacency"},{"line_number":35,"context_line":"from neutron.extensions import portbindings"},{"line_number":36,"context_line":"from neutron.extensions import segment as ext_segment"},{"line_number":37,"context_line":"from neutron.objects import network as obj_segmenthostmapping"},{"line_number":38,"context_line":"from neutron.plugins.common import constants as p_constants"},{"line_number":39,"context_line":"from neutron.plugins.ml2 import config"},{"line_number":40,"context_line":"from neutron.services.segments import db"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_310a1a8b","line":37,"updated":"2016-09-21 10:29:48.000000000","message":"Please import as network.","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from neutron.extensions import l2_adjacency"},{"line_number":35,"context_line":"from neutron.extensions import portbindings"},{"line_number":36,"context_line":"from neutron.extensions import segment as ext_segment"},{"line_number":37,"context_line":"from neutron.objects import network as obj_segmenthostmapping"},{"line_number":38,"context_line":"from neutron.plugins.common import constants as p_constants"},{"line_number":39,"context_line":"from neutron.plugins.ml2 import config"},{"line_number":40,"context_line":"from neutron.services.segments import db"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_95ab3889","line":37,"in_reply_to":"7a8ec9b2_310a1a8b","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ea61df90e820b2f1d78902115ed558e3e4a90d4f","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    def _get_segments_for_host(self, host):"},{"line_number":473,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":474,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":475,"context_line":"            ctx,"},{"line_number":476,"context_line":"            host\u003dhost)"},{"line_number":477,"context_line":"        return {seg_host[\u0027segment_id\u0027]: seg_host"},{"line_number":478,"context_line":"                for seg_host in segment_host_mapping}"},{"line_number":479,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_3d64b920","line":476,"range":{"start_line":475,"start_character":12,"end_line":476,"end_character":22},"updated":"2016-10-06 15:12:45.000000000","message":"nit: those can easily fits in a line","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"30851cb8dc12cd7bb94888b173ba10cc7a721ae3","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    def _get_segments_for_host(self, host):"},{"line_number":473,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":474,"context_line":"        segment_host_mapping \u003d network.SegmentHostMapping.get_objects("},{"line_number":475,"context_line":"            ctx,"},{"line_number":476,"context_line":"            host\u003dhost)"},{"line_number":477,"context_line":"        return {seg_host[\u0027segment_id\u0027]: seg_host"},{"line_number":478,"context_line":"                for seg_host in segment_host_mapping}"},{"line_number":479,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_105404fd","line":476,"range":{"start_line":475,"start_character":12,"end_line":476,"end_character":22},"in_reply_to":"1a95cdbc_3d64b920","updated":"2016-10-07 20:10:38.000000000","message":"Done","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ea61df90e820b2f1d78902115ed558e3e4a90d4f","unresolved":false,"context_lines":[{"line_number":789,"context_line":"    def _setup_host_mappings(self, mappings\u003d()):"},{"line_number":790,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":791,"context_line":"        for segment_id, host in mappings:"},{"line_number":792,"context_line":"            segmenthostdata \u003d network.SegmentHostMapping("},{"line_number":793,"context_line":"                ctx,"},{"line_number":794,"context_line":"                segment_id\u003dsegment_id,"},{"line_number":795,"context_line":"                host\u003dhost)"},{"line_number":796,"context_line":"            segmenthostdata.create()"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"    def _create_test_segment_with_subnet(self,"},{"line_number":799,"context_line":"                                         network\u003dNone,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a95cdbc_3d32f910","line":796,"range":{"start_line":792,"start_character":12,"end_line":796,"end_character":36},"updated":"2016-10-06 15:12:45.000000000","message":"same thing as previous one, this not requires an instance.","commit_id":"6769ead78c8c958c8831d23a6f68c5897de4bd7e"}],"neutron/tests/unit/objects/network/test_segment_host_mapping.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"16478fc393bd6d632666e3c9ef43d5fc2d144b2c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        super(SegmentHostMappingDbObjectTestCase, self).setUp()"},{"line_number":35,"context_line":"        self._create_test_network()"},{"line_number":36,"context_line":"        self._create_test_segment(network\u003dself._network)"},{"line_number":37,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields):"},{"line_number":38,"context_line":"            obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_e7f9c881","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":66},"updated":"2016-09-12 19:50:38.000000000","message":"for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):","commit_id":"1340a33536b463fa3a77598747a4d917e95f4bf9"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"686db7a71d25acdf54be1250b5c9aa38425aa6b6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        super(SegmentHostMappingDbObjectTestCase, self).setUp()"},{"line_number":35,"context_line":"        self._create_test_network()"},{"line_number":36,"context_line":"        self._create_test_segment(network\u003dself._network)"},{"line_number":37,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields):"},{"line_number":38,"context_line":"            obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a89bdaa_d0dc78e6","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":66},"in_reply_to":"9a89bdaa_e7f9c881","updated":"2016-09-12 21:08:54.000000000","message":"Done","commit_id":"1340a33536b463fa3a77598747a4d917e95f4bf9"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"94b41bdb9080689936dea3a6aa8e642596260788","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"7a8ec9b2_740c933b","updated":"2016-09-21 10:29:48.000000000","message":"You need to change this file name to objects/network.py, because pep8 is failing and you have the SegmentHostMapping in neutron/objects/network.py file.","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"edc91de2fbcb2491922fd32788429f398808649a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5a8bc5a2_d5cea082","in_reply_to":"7a8ec9b2_740c933b","updated":"2016-09-22 15:55:03.000000000","message":"Done","commit_id":"9ae6a49727aa3dc3b8527211f7a05fd37da6a283"}],"neutron/tests/unit/objects/test_network.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"5a3d9b7a2f16d8cad9ef55e26d6252478c72f374","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def setUp(self):"},{"line_number":171,"context_line":"        super(SegmentHostMappingDbObjectTestCase, self).setUp()"},{"line_number":172,"context_line":"        self._create_test_network()"},{"line_number":173,"context_line":"        self._create_test_segment(network\u003dself._network)"},{"line_number":174,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):"},{"line_number":175,"context_line":"            obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_214cdb6f","line":175,"range":{"start_line":172,"start_character":8,"end_line":175,"end_character":51},"updated":"2016-10-11 22:04:43.000000000","message":"for db_obj, obj_field, obj in zip(self.db_objs, self.obj_fields, self.objs):\n    self._create_test_network()\n    self._create_test_segment(network\u003dself._network)\n    db_obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]\n    obj_field[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]\n    obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"d5196a67f2a7907757653772cba8a203f7e9799b","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def setUp(self):"},{"line_number":171,"context_line":"        super(SegmentHostMappingDbObjectTestCase, self).setUp()"},{"line_number":172,"context_line":"        self._create_test_network()"},{"line_number":173,"context_line":"        self._create_test_segment(network\u003dself._network)"},{"line_number":174,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):"},{"line_number":175,"context_line":"            obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_8ee34b33","line":175,"range":{"start_line":172,"start_character":8,"end_line":175,"end_character":51},"in_reply_to":"fa6399be_1e9eff62","updated":"2016-10-17 15:13:52.000000000","message":"I didn\u0027t leave my reason in line but it says \"...wouldn\u0027t the test_network file fail tests for multiple object creation because they all have the same id for all networks?...\"","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"eb916bb63c9f80256489487733139cb70a294f75","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def setUp(self):"},{"line_number":171,"context_line":"        super(SegmentHostMappingDbObjectTestCase, self).setUp()"},{"line_number":172,"context_line":"        self._create_test_network()"},{"line_number":173,"context_line":"        self._create_test_segment(network\u003dself._network)"},{"line_number":174,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):"},{"line_number":175,"context_line":"            obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_1e9eff62","line":175,"range":{"start_line":172,"start_character":8,"end_line":175,"end_character":51},"in_reply_to":"fa6399be_214cdb6f","updated":"2016-10-13 14:34:27.000000000","message":"Why? I think it\u0027s ok to have a single network and a single segment for all tests here, isn\u0027t it?","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":22218,"name":"Sindhu Devale","email":"sindhu.devale@intel.com","username":"sindhudevale"},"change_message_id":"902e5356a15904b10d278ff1299aef70ac8c4bb0","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def setUp(self):"},{"line_number":171,"context_line":"        super(SegmentHostMappingDbObjectTestCase, self).setUp()"},{"line_number":172,"context_line":"        self._create_test_network()"},{"line_number":173,"context_line":"        self._create_test_segment(network\u003dself._network)"},{"line_number":174,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):"},{"line_number":175,"context_line":"            obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa6399be_a1549d21","line":175,"range":{"start_line":172,"start_character":8,"end_line":175,"end_character":51},"in_reply_to":"fa6399be_8ee34b33","updated":"2016-10-17 16:46:21.000000000","message":"Yes, I had the same question, won\u0027t the multiple object creation fail as all the objects have same segment_id which is the primary key?","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4830807c3b8f919c41520ce5bff9f76c2a6d59f2","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def setUp(self):"},{"line_number":171,"context_line":"        super(SegmentHostMappingDbObjectTestCase, self).setUp()"},{"line_number":172,"context_line":"        self._create_test_network()"},{"line_number":173,"context_line":"        self._create_test_segment(network\u003dself._network)"},{"line_number":174,"context_line":"        for obj in itertools.chain(self.db_objs, self.obj_fields, self.objs):"},{"line_number":175,"context_line":"            obj[\u0027segment_id\u0027] \u003d self._segment[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6895a0_e46f6890","line":175,"range":{"start_line":172,"start_character":8,"end_line":175,"end_character":51},"in_reply_to":"fa6399be_a1549d21","updated":"2016-10-21 15:23:02.000000000","message":"It\u0027s an interesting point actually. I just checked all tests in the base class, and I don\u0027t see a single one that would 1) create multiple objects AND 2) reuse the foreign key field value generated here. If we would have any of those tests, we would catch that issue.\n\nI will track the limitation in the tests myself. I think it\u0027s fine to proceed with the patch in the meantime.","commit_id":"5f02da34c20e7e01b1f034bf687ac814c59ab4c5"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"930f745fc0e61bd2203bd6b20e37cdab45b23267","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class SegmentHostMappingDbObjectTestCase(obj_test_base.BaseDbObjectTestCase,"},{"line_number":166,"context_line":"                                     testlib_api.SqlTestCase):"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    _test_class \u003d network.SegmentHostMapping"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_ed0a7b25","line":166,"range":{"start_line":166,"start_character":35,"end_line":166,"end_character":37},"updated":"2016-10-20 16:17:06.000000000","message":"nit: wrong identation","commit_id":"d08fccf46d1af422feb7329d59e177e5022d91a4"}]}
