)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c296dd9b94a0f492d5d9232ec871bd7e8dd9d1b1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"With this change, Neutron will filter subnets based on binding"},{"line_number":10,"context_line":"information, or lack thereof, which is provided with the port create call."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I39e1644ea6831c3efa082e4952ac1365e2f95e0d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bab6814e_4813dc66","line":11,"updated":"2016-05-19 07:50:34.000000000","message":"Miss the bp link here?","commit_id":"7be6b7d4c288045499786a637dcf52f6253ab1e2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1de924971328e1184c7640f09b655b3219b6fb50","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"With this change, Neutron will filter subnets based on binding"},{"line_number":10,"context_line":"information, or lack thereof, which is provided with the port create call."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I39e1644ea6831c3efa082e4952ac1365e2f95e0d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bab6814e_3057b9cf","line":11,"in_reply_to":"bab6814e_4813dc66","updated":"2016-05-19 20:59:53.000000000","message":"I\u0027ll add it.  Thanks.","commit_id":"7be6b7d4c288045499786a637dcf52f6253ab1e2"}],"neutron/db/ipam_backend_mixin.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1c15159061121c68912df7bcdb264621ae4c9b73","unresolved":false,"context_lines":[{"line_number":564,"context_line":"            try:"},{"line_number":565,"context_line":"                return query.one()[\u0027segment_id\u0027]"},{"line_number":566,"context_line":"            except orm_exc.NoResultFound:"},{"line_number":567,"context_line":"                raise segment_exc.HostNotConnectedToAnySegment("},{"line_number":568,"context_line":"                    host\u003dhost, network_id\u003dnetwork_id)"},{"line_number":569,"context_line":"            except orm_exc.MultipleResultsFound:"},{"line_number":570,"context_line":"                # TODO(Carl) For now, we\u0027re using a simplifying assumption that"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_746a5db4","line":567,"range":{"start_line":567,"start_character":34,"end_line":567,"end_character":62},"updated":"2016-05-17 16:14:27.000000000","message":"Basically, we don\u0027t want these exceptions exposed if the network is not a routed provider network (i.e. subnets are associated with segments).","commit_id":"9f932ce1dd1ae99bd19d31b2d42dc9949d9ec422"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3448a5f6fc655dbc2f5480d3a7701c27ceeb09d4","unresolved":false,"context_lines":[{"line_number":544,"context_line":"            query \u003d query.filter(Subnet.segment_id.is_(None))"},{"line_number":545,"context_line":"            return [self._make_subnet_dict(c, context\u003dcontext) for c in query]"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        # A host has been provided.  Consider these two scenarios"},{"line_number":548,"context_line":"        # 1. Not a routed network:  subnets are not on segments"},{"line_number":549,"context_line":"        # 2. Is a routed network:  only subnets on segments mapped to host"},{"line_number":550,"context_line":"        # The following join query returns results for either.  The two are"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_7a12f2b5","line":547,"updated":"2016-05-29 12:03:54.000000000","message":"can we split lines 547 \u003d\u003e 589 into a method. That will enable us to test it better.","commit_id":"fabc4e9a4c7037479d85ed2b144224d00d41fdbb"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d3ab60f6b996b1559287f7848ee059a2a2bd9d37","unresolved":false,"context_lines":[{"line_number":544,"context_line":"            query \u003d query.filter(Subnet.segment_id.is_(None))"},{"line_number":545,"context_line":"            return [self._make_subnet_dict(c, context\u003dcontext) for c in query]"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        # A host has been provided.  Consider these two scenarios"},{"line_number":548,"context_line":"        # 1. Not a routed network:  subnets are not on segments"},{"line_number":549,"context_line":"        # 2. Is a routed network:  only subnets on segments mapped to host"},{"line_number":550,"context_line":"        # The following join query returns results for either.  The two are"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_350ad479","line":547,"in_reply_to":"9abb7d3a_7a12f2b5","updated":"2016-05-31 19:05:07.000000000","message":"Il push back a little bit and ask you to suggest what better testing should be written before suggesting how the code should be structured to be better tested.  This new code has been reasonably well tested with the tests I\u0027ve added but it is possible there is a hole or two in the testing.\n\nIf testing this code requires breaking it in to smaller methods, then that makes sense.  But, just breaking it in to methods without having in mind exactly how we need to improve testing doesn\u0027t seem compelling.","commit_id":"fabc4e9a4c7037479d85ed2b144224d00d41fdbb"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d3ab60f6b996b1559287f7848ee059a2a2bd9d37","unresolved":false,"context_lines":[{"line_number":569,"context_line":"            query \u003d query.filter(Subnet.network_id \u003d\u003d network_id)"},{"line_number":570,"context_line":"            query \u003d query.filter(Subnet.segment_id.isnot(None))"},{"line_number":571,"context_line":"            if query.count() \u003d\u003d 0:"},{"line_number":572,"context_line":"                return []"},{"line_number":573,"context_line":"            # It is a routed network but no subnets found for host"},{"line_number":574,"context_line":"            raise segment_exc.HostNotConnectedToAnySegment("},{"line_number":575,"context_line":"                host\u003dhost, network_id\u003dnetwork_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_f0833a54","line":572,"range":{"start_line":572,"start_character":16,"end_line":572,"end_character":25},"updated":"2016-05-31 19:05:07.000000000","message":"After reviewing Gary\u0027s comment above, I did find that this case is not adequately tested (port create sends binding information but there are no subnets to allocate from).  I\u0027ll add a test for it.","commit_id":"fabc4e9a4c7037479d85ed2b144224d00d41fdbb"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c296dd9b94a0f492d5d9232ec871bd7e8dd9d1b1","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        # Map the host to the middle segment (by mocking host/segment mapping)"},{"line_number":421,"context_line":"        self._setup_host_mappings(["},{"line_number":422,"context_line":"            (segments[1][\u0027segment\u0027][\u0027id\u0027], \u0027fakehost\u0027),"},{"line_number":423,"context_line":"            (segments[1][\u0027segment\u0027][\u0027id\u0027], \u0027otherhost\u0027)])"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":426,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_48211c9f","line":423,"range":{"start_line":423,"start_character":22,"end_line":423,"end_character":23},"updated":"2016-05-19 07:50:34.000000000","message":"nit: I think changing this index will make this testcase more convincing.","commit_id":"7be6b7d4c288045499786a637dcf52f6253ab1e2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1de924971328e1184c7640f09b655b3219b6fb50","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        # Map the host to the middle segment (by mocking host/segment mapping)"},{"line_number":421,"context_line":"        self._setup_host_mappings(["},{"line_number":422,"context_line":"            (segments[1][\u0027segment\u0027][\u0027id\u0027], \u0027fakehost\u0027),"},{"line_number":423,"context_line":"            (segments[1][\u0027segment\u0027][\u0027id\u0027], \u0027otherhost\u0027)])"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        response \u003d self._create_port(self.fmt,"},{"line_number":426,"context_line":"                                     net_id\u003dnetwork[\u0027network\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_90f785f4","line":423,"range":{"start_line":423,"start_character":22,"end_line":423,"end_character":23},"in_reply_to":"bab6814e_48211c9f","updated":"2016-05-19 20:59:53.000000000","message":"It is just to make sure that the query doesn\u0027t get tripped up by having other hosts mapped to the segment.  I\u0027ll add a third mapping just for fun.","commit_id":"7be6b7d4c288045499786a637dcf52f6253ab1e2"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c296dd9b94a0f492d5d9232ec871bd7e8dd9d1b1","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        self.assertIn(ip, ip_net)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    def test_port_create_with_binding_information_fallback(self):"},{"line_number":438,"context_line":"        \"\"\"Binding information is provided, subnets not on segments\"\"\""},{"line_number":439,"context_line":"        network, segment, subnet \u003d self._create_test_segment_with_subnet()"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        # Map the host to the segment"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_88fae4bb","line":438,"range":{"start_line":438,"start_character":44,"end_line":438,"end_character":67},"updated":"2016-05-19 07:50:34.000000000","message":"In this test case, the subnet is still on the segment. So I think the content in this test case might not match its goal.","commit_id":"7be6b7d4c288045499786a637dcf52f6253ab1e2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1de924971328e1184c7640f09b655b3219b6fb50","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        self.assertIn(ip, ip_net)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    def test_port_create_with_binding_information_fallback(self):"},{"line_number":438,"context_line":"        \"\"\"Binding information is provided, subnets not on segments\"\"\""},{"line_number":439,"context_line":"        network, segment, subnet \u003d self._create_test_segment_with_subnet()"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        # Map the host to the segment"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_d630dbea","line":438,"range":{"start_line":438,"start_character":44,"end_line":438,"end_character":67},"in_reply_to":"bab6814e_88fae4bb","updated":"2016-05-19 20:59:53.000000000","message":"Huh, this test doesn\u0027t seem to do what I meant to make it do.  Let me figure it out.  Very good catch!","commit_id":"7be6b7d4c288045499786a637dcf52f6253ab1e2"}]}
