)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e1ae67023d30866ae6cfeeef46bc9a4d063e1cd9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now, when an agent removes a physical network from its configuration,"},{"line_number":10,"context_line":"not only the segments with that physical network will be unbinded"},{"line_number":11,"context_line":"from the host of upated agent. All the segments with that physical"},{"line_number":12,"context_line":"network will be unbinded from all hosts. This is incorrect, the"},{"line_number":13,"context_line":"segments should only be unbinded from the host of updated agent."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_bd29c739","line":11,"range":{"start_line":11,"start_character":17,"end_line":11,"end_character":23},"updated":"2016-06-29 01:14:38.000000000","message":"typo: updated","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"04c008ffc17d4d2ed63c8d5e217f6530cf96960a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now, when an agent removes a physical network from its configuration,"},{"line_number":10,"context_line":"not only the segments with that physical network will be unbinded"},{"line_number":11,"context_line":"from the host of upated agent. All the segments with that physical"},{"line_number":12,"context_line":"network will be unbinded from all hosts. This is incorrect, the"},{"line_number":13,"context_line":"segments should only be unbinded from the host of updated agent."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_fa2a2b8f","line":11,"range":{"start_line":11,"start_character":17,"end_line":11,"end_character":23},"in_reply_to":"3aaa91ec_bd29c739","updated":"2016-06-29 07:43:49.000000000","message":"Thanks, will update it if I need to post another PS","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e1ae67023d30866ae6cfeeef46bc9a4d063e1cd9","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        host1 \u003d \u0027host1\u0027"},{"line_number":397,"context_line":"        host2 \u003d \u0027host2\u0027"},{"line_number":398,"context_line":"        physical_network \u003d \u0027phys_net1\u0027"},{"line_number":399,"context_line":"        with self.network() as network:"},{"line_number":400,"context_line":"            network \u003d network[\u0027network\u0027]"},{"line_number":401,"context_line":"        segment1 \u003d self._test_create_segment("},{"line_number":402,"context_line":"            network_id\u003dnetwork[\u0027id\u0027],"},{"line_number":403,"context_line":"            physical_network\u003dphysical_network,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_fd77cf38","line":400,"range":{"start_line":399,"start_character":0,"end_line":400,"end_character":40},"updated":"2016-06-29 01:14:38.000000000","message":"This code is pretty confusing to me :) I thought that we should have everything below this in the same indentation, but it seems that you are just retrieving info about \"network\" and reassigning this to \"network\" :)\nIMHO, would be nice to have this reassigned to other variable, but I see that all the code is written like this.","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"04c008ffc17d4d2ed63c8d5e217f6530cf96960a","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        host1 \u003d \u0027host1\u0027"},{"line_number":397,"context_line":"        host2 \u003d \u0027host2\u0027"},{"line_number":398,"context_line":"        physical_network \u003d \u0027phys_net1\u0027"},{"line_number":399,"context_line":"        with self.network() as network:"},{"line_number":400,"context_line":"            network \u003d network[\u0027network\u0027]"},{"line_number":401,"context_line":"        segment1 \u003d self._test_create_segment("},{"line_number":402,"context_line":"            network_id\u003dnetwork[\u0027id\u0027],"},{"line_number":403,"context_line":"            physical_network\u003dphysical_network,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_1d5611d2","line":400,"range":{"start_line":399,"start_character":0,"end_line":400,"end_character":40},"in_reply_to":"3aaa91ec_fd77cf38","updated":"2016-06-29 07:43:49.000000000","message":"This is a shortcut to create network and get network dict. Since there is no other operation after the contextmanager yield the result, I think it is fine to use it like this.","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e1ae67023d30866ae6cfeeef46bc9a4d063e1cd9","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            physical_network\u003dphysical_network,"},{"line_number":404,"context_line":"            segmentation_id\u003d200,"},{"line_number":405,"context_line":"            network_type\u003dp_constants.TYPE_VLAN)[\u0027segment\u0027]"},{"line_number":406,"context_line":"        self._register_agent(host1, mappings\u003d{physical_network: \u0027br-eth-1\u0027},"},{"line_number":407,"context_line":"                             plugin\u003dself.plugin)"},{"line_number":408,"context_line":"        self._register_agent(host2, mappings\u003d{physical_network: \u0027br-eth-1\u0027},"},{"line_number":409,"context_line":"                             plugin\u003dself.plugin)"},{"line_number":410,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_9d796bff","line":407,"range":{"start_line":406,"start_character":8,"end_line":407,"end_character":48},"updated":"2016-06-29 01:14:38.000000000","message":"Could you explain, how does it work? I see you\u0027re creating segment, but it doesn\u0027t seem to be assigned anymore. Does it mean, that this function does some kind of magic?","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"04c008ffc17d4d2ed63c8d5e217f6530cf96960a","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            physical_network\u003dphysical_network,"},{"line_number":404,"context_line":"            segmentation_id\u003d200,"},{"line_number":405,"context_line":"            network_type\u003dp_constants.TYPE_VLAN)[\u0027segment\u0027]"},{"line_number":406,"context_line":"        self._register_agent(host1, mappings\u003d{physical_network: \u0027br-eth-1\u0027},"},{"line_number":407,"context_line":"                             plugin\u003dself.plugin)"},{"line_number":408,"context_line":"        self._register_agent(host2, mappings\u003d{physical_network: \u0027br-eth-1\u0027},"},{"line_number":409,"context_line":"                             plugin\u003dself.plugin)"},{"line_number":410,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_fd67c5b4","line":407,"range":{"start_line":406,"start_character":8,"end_line":407,"end_character":48},"in_reply_to":"3aaa91ec_9d796bff","updated":"2016-06-29 07:43:49.000000000","message":"This is a bit like functional test here, registering agent will trigger agent create event and thus the segment-host-mapping will be added under the hood.","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e1ae67023d30866ae6cfeeef46bc9a4d063e1cd9","unresolved":false,"context_lines":[{"line_number":417,"context_line":"            network_type\u003dp_constants.TYPE_VLAN)[\u0027segment\u0027]"},{"line_number":418,"context_line":"        self._register_agent(host2, mappings\u003d{other_phys_net: \u0027br-eth-2\u0027},"},{"line_number":419,"context_line":"                             plugin\u003dself.plugin)"},{"line_number":420,"context_line":"        # We should have segment1 map to host1 and segment2 map to host2 now"},{"line_number":421,"context_line":"        segments_host_db1 \u003d self._get_segments_for_host(host1)"},{"line_number":422,"context_line":"        self.assertEqual(1, len(segments_host_db1))"},{"line_number":423,"context_line":"        self.assertEqual(segment1[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_fd3a2f33","line":420,"range":{"start_line":420,"start_character":8,"end_line":420,"end_character":76},"updated":"2016-06-29 01:14:38.000000000","message":"Can I ask you, why is that? According to code 401:409, you\u0027re registering two agents, one for each host. Maybe it would be good to add also test to show, that before 412:419 we indeed have two hosts?","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"04c008ffc17d4d2ed63c8d5e217f6530cf96960a","unresolved":false,"context_lines":[{"line_number":417,"context_line":"            network_type\u003dp_constants.TYPE_VLAN)[\u0027segment\u0027]"},{"line_number":418,"context_line":"        self._register_agent(host2, mappings\u003d{other_phys_net: \u0027br-eth-2\u0027},"},{"line_number":419,"context_line":"                             plugin\u003dself.plugin)"},{"line_number":420,"context_line":"        # We should have segment1 map to host1 and segment2 map to host2 now"},{"line_number":421,"context_line":"        segments_host_db1 \u003d self._get_segments_for_host(host1)"},{"line_number":422,"context_line":"        self.assertEqual(1, len(segments_host_db1))"},{"line_number":423,"context_line":"        self.assertEqual(segment1[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_5db6d9dc","line":420,"range":{"start_line":420,"start_character":8,"end_line":420,"end_character":76},"in_reply_to":"3aaa91ec_fd3a2f33","updated":"2016-06-29 07:43:49.000000000","message":"I think the above comment can answer your question here, and test_same_segment_two_hosts is the test case which actually verify the case you mentioned. I don\u0027t want to duplicate test here, so I go straightly to the verify the final result here.","commit_id":"b20188d2652e4907dcfc173f4d5d1a8d557227e1"}]}
