)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"5424a13804729f4b7f34818da554d8c92ec64e2b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"mappings. Currently, external networks of type VLAN and FLAT"},{"line_number":18,"context_line":"use bridge mappings. So for these networks, we return chassis"},{"line_number":19,"context_line":"with proper bridge mappings and for other networks we return"},{"line_number":20,"context_line":"all chassis."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1705246"},{"line_number":23,"context_line":"Change-Id: I73970aef6d84019032e3c68a6a785d7626ae2afc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_acd0be20","line":20,"updated":"2017-08-11 02:26:54.000000000","message":"Nice approach! Scheduling unhosted gateways for chassis events and OVN sync is also affected and needs corresponding changes. \nhttps://github.com/openstack/networking-ovn/blob/master/networking_ovn/l3/l3_ovn.py#L394","commit_id":"0b1ebf7c72161630d807615f34d499cac32d7187"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"125e643c25d3d0963d1f3a79154fc8ed410e1a4e","unresolved":false,"context_lines":[{"line_number":17,"context_line":"mappings. Currently, external networks of type VLAN and FLAT"},{"line_number":18,"context_line":"use bridge mappings. So for these networks, we return chassis"},{"line_number":19,"context_line":"with proper bridge mappings and for other networks we return"},{"line_number":20,"context_line":"all chassis."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-bug: #1705246"},{"line_number":23,"context_line":"Change-Id: I73970aef6d84019032e3c68a6a785d7626ae2afc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_80adbb89","line":20,"in_reply_to":"9f436f4f_acd0be20","updated":"2017-08-11 06:19:01.000000000","message":"Thanks Dong. I will check","commit_id":"0b1ebf7c72161630d807615f34d499cac32d7187"}],"networking_ovn/l3/l3_ovn.py":[{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"0a4be04fa7b19cc743716fd34af13bec04c104ed","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def schedule_unhosted_gateways(self):"},{"line_number":412,"context_line":"        valid_chassis_list \u003d self._sb_ovn.get_all_chassis()"},{"line_number":413,"context_line":"        unhosted_gateways \u003d self._ovn.get_unhosted_gateways("},{"line_number":414,"context_line":"            valid_chassis_list)"},{"line_number":415,"context_line":"        if unhosted_gateways:"},{"line_number":416,"context_line":"            gw_ports, nets \u003d self._get_gw_ports_and_external_networks()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f436f4f_fa3827d3","line":413,"range":{"start_line":413,"start_character":8,"end_line":413,"end_character":60},"updated":"2017-08-17 05:51:03.000000000","message":"When physical mapping changed, the related gateway ports may become unhosted gateways but they are not got here.","commit_id":"d5d23c9a0ff0d374b1cb5b95a82b0e7462ed6e53"},{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"e314a5c1eb9faeb7667a34b0e41ed0de41a841e5","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def schedule_unhosted_gateways(self):"},{"line_number":412,"context_line":"        valid_chassis_list \u003d self._sb_ovn.get_all_chassis()"},{"line_number":413,"context_line":"        unhosted_gateways \u003d self._ovn.get_unhosted_gateways("},{"line_number":414,"context_line":"            valid_chassis_list)"},{"line_number":415,"context_line":"        if unhosted_gateways:"},{"line_number":416,"context_line":"            gw_ports, nets \u003d self._get_gw_ports_and_external_networks()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f436f4f_a7f39073","line":413,"range":{"start_line":413,"start_character":8,"end_line":413,"end_character":60},"in_reply_to":"9f436f4f_98dfde64","updated":"2017-08-18 02:03:52.000000000","message":"eg.\nWe have mapping ovn-bridge-mappings\u003d\"physnet1:br1,physnet2:br2\" and gateway router port R has been scheduled to \u0027physnet1\u0027. Then physnet1 was removed from OVS DB by ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings\u003dphysnet2:br2. The port R become a unhosted router port, right?","commit_id":"d5d23c9a0ff0d374b1cb5b95a82b0e7462ed6e53"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"dc8ff42950bc70a792da9fa34e13063ce87c633b","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def schedule_unhosted_gateways(self):"},{"line_number":412,"context_line":"        valid_chassis_list \u003d self._sb_ovn.get_all_chassis()"},{"line_number":413,"context_line":"        unhosted_gateways \u003d self._ovn.get_unhosted_gateways("},{"line_number":414,"context_line":"            valid_chassis_list)"},{"line_number":415,"context_line":"        if unhosted_gateways:"},{"line_number":416,"context_line":"            gw_ports, nets \u003d self._get_gw_ports_and_external_networks()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f436f4f_2fe2ca02","line":413,"range":{"start_line":413,"start_character":8,"end_line":413,"end_character":60},"in_reply_to":"9f436f4f_a7f39073","updated":"2017-08-18 10:36:47.000000000","message":"Thanks Dong. I will update the patch.","commit_id":"d5d23c9a0ff0d374b1cb5b95a82b0e7462ed6e53"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"21af3eee365cfe65c2ce08fe52940f368dbfbb67","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def schedule_unhosted_gateways(self):"},{"line_number":412,"context_line":"        valid_chassis_list \u003d self._sb_ovn.get_all_chassis()"},{"line_number":413,"context_line":"        unhosted_gateways \u003d self._ovn.get_unhosted_gateways("},{"line_number":414,"context_line":"            valid_chassis_list)"},{"line_number":415,"context_line":"        if unhosted_gateways:"},{"line_number":416,"context_line":"            gw_ports, nets \u003d self._get_gw_ports_and_external_networks()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f436f4f_98dfde64","line":413,"range":{"start_line":413,"start_character":8,"end_line":413,"end_character":60},"in_reply_to":"9f436f4f_fa3827d3","updated":"2017-08-17 10:54:00.000000000","message":"Can you please elaborate your comment?","commit_id":"d5d23c9a0ff0d374b1cb5b95a82b0e7462ed6e53"}],"networking_ovn/l3/l3_ovn_scheduler.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e1aa4b22bc422524792c649e487c0f888b65fbbf","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        pass"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_chassis_candidates(self, sb_idl):"},{"line_number":67,"context_line":"        return sb_idl.get_all_chassis(\u0027gateway_router\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class OVNGatewayChanceScheduler(OVNGatewayScheduler):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_e41664a8","line":67,"range":{"start_line":67,"start_character":38,"end_line":67,"end_character":54},"updated":"2017-07-19 13:01:32.000000000","message":"chassis_type\u003d\u0027gateway_router\u0027 for clarity?","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"b88bdba2038904e3ca3806c03ebd19ea3cc14f55","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        pass"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_chassis_candidates(self, sb_idl):"},{"line_number":67,"context_line":"        return sb_idl.get_all_chassis(\u0027gateway_router\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class OVNGatewayChanceScheduler(OVNGatewayScheduler):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_b652c6dd","line":67,"range":{"start_line":67,"start_character":38,"end_line":67,"end_character":54},"in_reply_to":"1f1a1f67_e41664a8","updated":"2017-07-20 04:17:26.000000000","message":"sure, thanks Daniel.","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"419ad6527330b2a954e868b0c0ed67a2a7ab7b07","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        pass"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_chassis_candidates(self, sb_idl):"},{"line_number":67,"context_line":"        return sb_idl.get_chassis_with_external_connectivity()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class OVNGatewayChanceScheduler(OVNGatewayScheduler):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_27944544","line":67,"updated":"2017-08-08 12:48:32.000000000","message":"I would suggest keep this function AS IS and add a new function like below\n\ndef _get_chassis_candidates_with_bridge_mappings():\n    return sb_idl.get_chassis_with_bridge_mappings()\n\nAnd in the function schedule_unhosted_gateways (here - https://github.com/openstack/networking-ovn/blob/master/networking_ovn/l3/l3_ovn.py#L399) \n - get the router port from the logical router port name\n - get the gateway information and figure out if it is a provider network or not (i.e geneve network - for Dong Jun\u0027s usecase)\n - if it is not a provider network, then call \"_get_chassis_candidates()\" and pass the candidate list to the \"select\" function (see L401 in l3_ovn.py)\n - If it is a provider network, call \"select\" with candidate param set to None and in the function - _schedule_gateway() in l3_ovn_scheduler.py in 48, call \"_get_chassis_candidates_with_bridge_mappings\".\n\nThis way, if the router gateway is provider network we select only those chassis which have ovn-bridge-mappings defined and for the other case, we select all chassis as candidates.\n\nDoes this makes sense ?","commit_id":"9c0d1d0f3da20f9eddaa106a80349820556c1888"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"9b55d75257fa127de9826b11fa2521584e3275aa","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        pass"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_chassis_candidates(self, sb_idl):"},{"line_number":67,"context_line":"        return sb_idl.get_chassis_with_external_connectivity()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class OVNGatewayChanceScheduler(OVNGatewayScheduler):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_44e62219","line":67,"in_reply_to":"9f436f4f_27944544","updated":"2017-08-08 13:44:48.000000000","message":"Yes,thanks Numan","commit_id":"9c0d1d0f3da20f9eddaa106a80349820556c1888"}],"networking_ovn/ovsdb/impl_idl_ovn.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e1aa4b22bc422524792c649e487c0f888b65fbbf","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            chassis_info_dict[ch.hostname] \u003d self._get_chassis_physnets(ch)"},{"line_number":582,"context_line":"        return chassis_info_dict"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        chassis_list \u003d []"},{"line_number":586,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":587,"context_line":"            if (chassis_type !\u003d \u0027gateway_router\u0027) or \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_a4cf4c27","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":23},"updated":"2017-07-19 13:01:32.000000000","message":"This is confusing for me. I would expect that this function would return all chassis whose type match the input parameter. However, you\u0027re also checking on ovn-bridge-mappings. Maybe adding a new function like \"get_all_chassis_with_external_connectivity\" and return those who has the external id \u0027ovn-bridge-mappings\u0027 populated?","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"463a60dbc7d9a78d74c9a35ae24bbd00e376486d","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            chassis_info_dict[ch.hostname] \u003d self._get_chassis_physnets(ch)"},{"line_number":582,"context_line":"        return chassis_info_dict"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        chassis_list \u003d []"},{"line_number":586,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":587,"context_line":"            if (chassis_type !\u003d \u0027gateway_router\u0027) or \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_9cb6c4dc","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":23},"in_reply_to":"1f1a1f67_5cca6ca1","updated":"2017-07-20 09:26:52.000000000","message":"+1 to that constants definition but then you would still check for the br mappings? maybe define some function like \"chassis_has_external_connectivity\" that does this check?","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"9fd934ce5f2ec29db75ee16bdcbb3b21f9b52050","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            chassis_info_dict[ch.hostname] \u003d self._get_chassis_physnets(ch)"},{"line_number":582,"context_line":"        return chassis_info_dict"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        chassis_list \u003d []"},{"line_number":586,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":587,"context_line":"            if (chassis_type !\u003d \u0027gateway_router\u0027) or \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_e8ca976c","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":23},"in_reply_to":"1f1a1f67_964fca33","updated":"2017-07-20 08:55:34.000000000","message":"Hmmm, right, there\u0027s no such column in chassis table so I wonder what that TODO comment meant. There should\u0027ve been a reference to that \"compute type preference patch\" so that we can take a look.\nOnly reference I\u0027ve found is [0] but I guess that someone else will have to clarify since I lack this knowledge...\nYou\u0027re probably right choosing 2) over 1) but to me it\u0027s still confusing...\n\n[0] https://github.com/openstack/networking-ovn/blob/6c4e560eedbd2987470d2dc815aaef19bae9999a/networking_ovn/ovsdb/ovn_api.py#L549","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"b88bdba2038904e3ca3806c03ebd19ea3cc14f55","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            chassis_info_dict[ch.hostname] \u003d self._get_chassis_physnets(ch)"},{"line_number":582,"context_line":"        return chassis_info_dict"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        chassis_list \u003d []"},{"line_number":586,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":587,"context_line":"            if (chassis_type !\u003d \u0027gateway_router\u0027) or \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_964fca33","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":23},"in_reply_to":"1f1a1f67_a4cf4c27","updated":"2017-07-20 04:17:26.000000000","message":"\"I would expect that this function would return all chassis whose type match the input parameter.\"\n\nWhat is \"chassis_type\" argument representing here?\n1) chassis_type is noting but column \"type\" in chassis table? If so, then there is no such column in chassis table.\n2) chassis are classified into types based on functionality? If so, do we have any doc for that? Should I consider \"chassis_type\" argument should reflect these types?\n\nFrom the \"TODO(azbiswas)\", I thought chassis_type\u003d\u003d\u0027gateway_router\u0027 is a chassis with external connectivity, and in db represented by adding ovn-bridge-mappings in chassis\u0027s external_ids.\n\nPlease correct me if I am wrong.","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"aba0e12354d5bb511133e57e992984686399c74c","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            chassis_info_dict[ch.hostname] \u003d self._get_chassis_physnets(ch)"},{"line_number":582,"context_line":"        return chassis_info_dict"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        chassis_list \u003d []"},{"line_number":586,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":587,"context_line":"            if (chassis_type !\u003d \u0027gateway_router\u0027) or \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_5cca6ca1","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":23},"in_reply_to":"1f1a1f67_e8ca976c","updated":"2017-07-20 09:21:18.000000000","message":"Thanks Daniel. Yes, This is not defined in core OVN. And networking-ovn is trying to define as per the functionality. May be we can define chassis_type in networking_ovn the way neutron defines port\u0027s device_owner or port_type based on the functionality? While defining the constants, we can give description about the functionality and the way to identify chassis. For example we can have below constants,\n\n\n# \"gateway_router\" is the chassis which has external connectivity. Chassis with ovn-bridge-mappings in external_ids is assumed as having external connectivity.\nCHASSIS_TYPE_GATEWAY_ROUTER \u003d \"gateway_router\"\n\n# \"compute\" is the chassis which hosts vm, runs ovn-controller and  no other ovn or neutron services. How to identify such chassis in networking-ovn code?\nCHASSIS_TYPE_COMPUTE \u003d \"compute\"\n\n# \"gateway\" is the chassis which runs ovn-controller-vtep. How to identify such chassis in networking-ovn code?\nCHASSIS_TYPE_GATEWAY \u003d \"gateway\"","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e1aa4b22bc422524792c649e487c0f888b65fbbf","unresolved":false,"context_lines":[{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        chassis_list \u003d []"},{"line_number":586,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":587,"context_line":"            if (chassis_type !\u003d \u0027gateway_router\u0027) or \\"},{"line_number":588,"context_line":"               ch.external_ids.get(\u0027ovn-bridge-mappings\u0027, \u0027\u0027):"},{"line_number":589,"context_line":"                chassis_list.append(ch.name)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        return chassis_list"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_8401f06c","line":588,"range":{"start_line":587,"start_character":11,"end_line":588,"end_character":62},"updated":"2017-07-19 13:01:32.000000000","message":"I\u0027d write it like:\n\nif (chassis_type !\u003d \u0027gateway_router\u0027 or\n        ch.external_ids.get(\u0027ovn-bridge-mappings\u0027, \u0027\u0027):","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"b88bdba2038904e3ca3806c03ebd19ea3cc14f55","unresolved":false,"context_lines":[{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        chassis_list \u003d []"},{"line_number":586,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":587,"context_line":"            if (chassis_type !\u003d \u0027gateway_router\u0027) or \\"},{"line_number":588,"context_line":"               ch.external_ids.get(\u0027ovn-bridge-mappings\u0027, \u0027\u0027):"},{"line_number":589,"context_line":"                chassis_list.append(ch.name)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        return chassis_list"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_765e6eea","line":588,"range":{"start_line":587,"start_character":11,"end_line":588,"end_character":62},"in_reply_to":"1f1a1f67_8401f06c","updated":"2017-07-20 04:17:26.000000000","message":"sure, thanks Daniel.","commit_id":"362b649cf02fe275854a4833073dbfe8ee2a5fa1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3967e558498621b155b11c72ab04920dc22f7ccf","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        return chassis_info_dict"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        if chassis_type \u003d\u003d ovn_const.OVN_CHASSIS_TYPE_GATEWAY_ROUTER:"},{"line_number":586,"context_line":"            return self._get_chassis_with_external_connectivity()"},{"line_number":587,"context_line":"        else:"},{"line_number":588,"context_line":"            return self._get_all_chassis()"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_9dad2233","line":585,"updated":"2017-08-02 09:03:26.000000000","message":"why just not having a separate function ? \n\nget_chassis_with_external_connectivity( . ?\n\n\nBTW, you\u0027re missing something, you can have several external networks by different \"physnet\" names, on different chassis.\n\n\n\none could be public, other could be legacy-internal, other could be ... external2 ....\n\n\nI believe we should be able to pick by specific network, based on what the neutron network belongs to, but I believe we should do that in follow up for next release and try to merge this on this release.","commit_id":"2adc9500e9e03a74c64b48a52c53dd259d46f143"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"a6b9a1f0a08b8ea1a6d5ada10f737a4271481684","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        return chassis_info_dict"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def get_all_chassis(self, chassis_type\u003dNone):"},{"line_number":585,"context_line":"        if chassis_type \u003d\u003d ovn_const.OVN_CHASSIS_TYPE_GATEWAY_ROUTER:"},{"line_number":586,"context_line":"            return self._get_chassis_with_external_connectivity()"},{"line_number":587,"context_line":"        else:"},{"line_number":588,"context_line":"            return self._get_all_chassis()"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_d39f1a01","line":585,"in_reply_to":"df3967d1_9dad2233","updated":"2017-08-02 10:28:02.000000000","message":"Yes, thanks for that. I will submit follow up patch for that.","commit_id":"2adc9500e9e03a74c64b48a52c53dd259d46f143"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5a223d376089cee7183e3d0622fe9769c2b02506","unresolved":false,"context_lines":[{"line_number":585,"context_line":"        if chassis_type \u003d\u003d ovn_const.OVN_CHASSIS_TYPE_GATEWAY_ROUTER:"},{"line_number":586,"context_line":"            return self._get_chassis_with_external_connectivity()"},{"line_number":587,"context_line":"        else:"},{"line_number":588,"context_line":"            return self._get_all_chassis()"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _get_all_chassis(self):"},{"line_number":591,"context_line":"        return [ch.name for ch in self.idl.tables[\u0027Chassis\u0027].rows.values()]"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_b65fe470","line":588,"updated":"2017-08-02 10:58:49.000000000","message":"can we separate this to two functions intead?\n* get_all_chassis\n* get_all_chassis_with_ext_connectivity\n\neventually the second (later patches) would accept a parameter for the physnet names we\u0027re looking for.","commit_id":"2adc9500e9e03a74c64b48a52c53dd259d46f143"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"fa1820fa8ff0f64271fa24e0dedf74356b2ab50a","unresolved":false,"context_lines":[{"line_number":585,"context_line":"        if chassis_type \u003d\u003d ovn_const.OVN_CHASSIS_TYPE_GATEWAY_ROUTER:"},{"line_number":586,"context_line":"            return self._get_chassis_with_external_connectivity()"},{"line_number":587,"context_line":"        else:"},{"line_number":588,"context_line":"            return self._get_all_chassis()"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _get_all_chassis(self):"},{"line_number":591,"context_line":"        return [ch.name for ch in self.idl.tables[\u0027Chassis\u0027].rows.values()]"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_bcf6a3f8","line":588,"in_reply_to":"df3967d1_b65fe470","updated":"2017-08-02 11:45:20.000000000","message":"If we split like that, then do u want _get_chassis_candidates directly call get_all_chassis_with_ext_connectivity() instead of \nget_all_chassis(chassis_type\u003dovn_const.OVN_CHASSIS_TYPE_GATEWAY_ROUTER)?","commit_id":"2adc9500e9e03a74c64b48a52c53dd259d46f143"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"70ad3c4d2f67099dffd5ee52046b5dbc3b3c4d67","unresolved":false,"context_lines":[{"line_number":585,"context_line":"        if chassis_type \u003d\u003d ovn_const.OVN_CHASSIS_TYPE_GATEWAY_ROUTER:"},{"line_number":586,"context_line":"            return self._get_chassis_with_external_connectivity()"},{"line_number":587,"context_line":"        else:"},{"line_number":588,"context_line":"            return self._get_all_chassis()"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _get_all_chassis(self):"},{"line_number":591,"context_line":"        return [ch.name for ch in self.idl.tables[\u0027Chassis\u0027].rows.values()]"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_dd4c97c9","line":588,"in_reply_to":"df3967d1_bcf6a3f8","updated":"2017-08-03 14:04:50.000000000","message":"Yes, that would be the idea.\n\nIt\u0027s a common pattern: if you have a function with a parameter that it\u0027s going to serve as if condition to branch to two other functions... unless you have a very good reason to do that (abstraction or API interface), chose instead to have two functions.","commit_id":"2adc9500e9e03a74c64b48a52c53dd259d46f143"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"01c841b3e3b8b83436f28fc11a3d4203c5725039","unresolved":false,"context_lines":[{"line_number":585,"context_line":"        if chassis_type \u003d\u003d ovn_const.OVN_CHASSIS_TYPE_GATEWAY_ROUTER:"},{"line_number":586,"context_line":"            return self._get_chassis_with_external_connectivity()"},{"line_number":587,"context_line":"        else:"},{"line_number":588,"context_line":"            return self._get_all_chassis()"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _get_all_chassis(self):"},{"line_number":591,"context_line":"        return [ch.name for ch in self.idl.tables[\u0027Chassis\u0027].rows.values()]"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_66fd186d","line":588,"in_reply_to":"df3967d1_dd4c97c9","updated":"2017-08-03 15:13:31.000000000","message":"sure, thanks Miguel","commit_id":"2adc9500e9e03a74c64b48a52c53dd259d46f143"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b1f7e4587ef5eb31416695528debc713f9927d48","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        candidates \u003d []"},{"line_number":580,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":581,"context_line":"            mappings \u003d ch.external_ids.get(\u0027ovn-bridge-mappings\u0027, \u0027\u0027)"},{"line_number":582,"context_line":"            if mappings and physnet \u003d\u003d mappings.split(\u0027:\u0027)[0]:"},{"line_number":583,"context_line":"                candidates.append(ch.name)"},{"line_number":584,"context_line":"        return candidates"},{"line_number":585,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_e292669f","line":582,"range":{"start_line":582,"start_character":38,"end_line":582,"end_character":62},"updated":"2017-08-10 12:47:46.000000000","message":"Question, we will only have only 1 physnet to bridge mapping here or we could have multiple ones ?\n\nSay we have something like \"physnet0:bridge-xxx,physnet1:bridge-yyy\" and we the `physnet` parameter passed to this method is \"physnet1\", this code will ignore it, right ?\n\nI wonder if we need another loop to iterate between the list of mappings. For example:\n\n if not mappings:\n     continue \n    \n for map in mappings.split(\u0027,\u0027):\n    if physnet \u003d\u003d map.split(\u0027:\u0027)[0]:\n        candidates.append(ch.name)","commit_id":"0b1ebf7c72161630d807615f34d499cac32d7187"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c6a6720b468b6ad5396dcad260e48bd9e2df2c09","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        candidates \u003d []"},{"line_number":580,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":581,"context_line":"            mappings \u003d ch.external_ids.get(\u0027ovn-bridge-mappings\u0027, \u0027\u0027)"},{"line_number":582,"context_line":"            if mappings and physnet \u003d\u003d mappings.split(\u0027:\u0027)[0]:"},{"line_number":583,"context_line":"                candidates.append(ch.name)"},{"line_number":584,"context_line":"        return candidates"},{"line_number":585,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_cdac3337","line":582,"range":{"start_line":582,"start_character":38,"end_line":582,"end_character":62},"in_reply_to":"9f436f4f_2db61ffc","updated":"2017-08-10 13:41:37.000000000","message":"Oh yes, I\u0027d check all the mappings, to see if at lest one mapping has the physnet we\u0027re looking for, not just the first one.\n\nYou need to split by comma, strip any spaces, and then iterate over all those, splitting again by \u0027:\u0027, and checking with the first part, as you did.","commit_id":"0b1ebf7c72161630d807615f34d499cac32d7187"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"526bae3af1f0f7b29da8679325f94d0e425706b8","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        candidates \u003d []"},{"line_number":580,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":581,"context_line":"            mappings \u003d ch.external_ids.get(\u0027ovn-bridge-mappings\u0027, \u0027\u0027)"},{"line_number":582,"context_line":"            if mappings and physnet \u003d\u003d mappings.split(\u0027:\u0027)[0]:"},{"line_number":583,"context_line":"                candidates.append(ch.name)"},{"line_number":584,"context_line":"        return candidates"},{"line_number":585,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_2db61ffc","line":582,"range":{"start_line":582,"start_character":38,"end_line":582,"end_character":62},"in_reply_to":"9f436f4f_a2ba1e07","updated":"2017-08-10 13:24:55.000000000","message":"Thanks Lucas, that makes sense. I will update the patch.","commit_id":"0b1ebf7c72161630d807615f34d499cac32d7187"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"57129f35701c4a6154c7b63088200250ddd2c971","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        candidates \u003d []"},{"line_number":580,"context_line":"        for ch in self.idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":581,"context_line":"            mappings \u003d ch.external_ids.get(\u0027ovn-bridge-mappings\u0027, \u0027\u0027)"},{"line_number":582,"context_line":"            if mappings and physnet \u003d\u003d mappings.split(\u0027:\u0027)[0]:"},{"line_number":583,"context_line":"                candidates.append(ch.name)"},{"line_number":584,"context_line":"        return candidates"},{"line_number":585,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_a2ba1e07","line":582,"range":{"start_line":582,"start_character":38,"end_line":582,"end_character":62},"in_reply_to":"9f436f4f_e292669f","updated":"2017-08-10 12:49:18.000000000","message":"Sorry for all the typos haha I didn\u0027t re-read it before submitting the comment... I hope the main idea is clear (-:\n\n/me can\u0027t english today","commit_id":"0b1ebf7c72161630d807615f34d499cac32d7187"}],"networking_ovn/tests/functional/test_router.py":[{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"815a12cf74baca17f374d236b937c892b9ef56f4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            \u0027ext2\u0027, \u0027flat\u0027, \u0027physnet3\u0027, None, \"20.0.0.1\", \"20.0.0.0/24\")"},{"line_number":74,"context_line":"        ext3 \u003d self._create_ext_network("},{"line_number":75,"context_line":"            \u0027ext3\u0027, \u0027geneve\u0027, None, 10, \"30.0.0.1\", \"30.0.0.0/24\")"},{"line_number":76,"context_line":"        print(\"ext3 \u003d \", ext3)"},{"line_number":77,"context_line":"        # mock select function and later check if it is called with"},{"line_number":78,"context_line":"        # expected candidates."},{"line_number":79,"context_line":"        self.candidates \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f436f4f_251b98d0","line":76,"updated":"2017-08-13 17:29:19.000000000","message":"need to remove this :)","commit_id":"f85fbe9406179002ea7f1bd65665102762dc8bb2"}]}
