)]}'
{"dragonflow/controller/dnat_app.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cc865196b83196f873ca0a21d8c56b0175efdeee","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            # install the common goto flow rule."},{"line_number":276,"context_line":"            parser \u003d self.get_datapath().ofproto_parser"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"            for table_id in (const.INGRESS_CLASSIFICATION_DISPATCH_TABLE,"},{"line_number":279,"context_line":"                             const.INGRESS_DESTINATION_PORT_LOOKUP_TABLE):"},{"line_number":280,"context_line":"                match \u003d parser.OFPMatch()"},{"line_number":281,"context_line":"                match.set_in_port(self.external_ofport)"},{"line_number":282,"context_line":"                self.add_flow_go_to_table(self.get_datapath(),"},{"line_number":283,"context_line":"                                          table_id,"},{"line_number":284,"context_line":"                                          const.PRIORITY_DEFAULT,"},{"line_number":285,"context_line":"                                          const.INGRESS_NAT_TABLE,"},{"line_number":286,"context_line":"                                          match\u003dmatch)"},{"line_number":287,"context_line":"        self._install_floatingip_arp_responder(floatingip)"},{"line_number":288,"context_line":"        self._install_dnat_ingress_rules(floatingip)"},{"line_number":289,"context_line":"        self._increase_external_network_count(network_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_cefa2743","line":286,"range":{"start_line":278,"start_character":0,"end_line":286,"end_character":54},"updated":"2016-11-01 12:52:45.000000000","message":"I think we can avoid add inport match either in INGRESS_CLASSIFICATION_DISPATCH_TABLE or in INGRESS_DESTINATION_PORT_LOOKUP_TABLE.\n\nWe can just match the vlan id of incomming packet, and then set the metadata and then submit to table 7 (INGRESS_DESTINATION_PORT_LOOKUP_TABLE).","commit_id":"7757b29565930c3bd7144f95b0ef6e8fa7a13df9"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b76dc01cc1abd6bc3827f262db5cc7ff24b51fb2","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            # if it is the first floating ip on this node, then"},{"line_number":283,"context_line":"            # install the common goto flow rule."},{"line_number":284,"context_line":"            parser \u003d self.get_datapath().ofproto_parser"},{"line_number":285,"context_line":"            match \u003d parser.OFPMatch()"},{"line_number":286,"context_line":"            self.add_flow_go_to_table(self.get_datapath(),"},{"line_number":287,"context_line":"                const.INGRESS_DESTINATION_PORT_LOOKUP_TABLE,"},{"line_number":288,"context_line":"                const.PRIORITY_DEFAULT,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_35fbd548","line":285,"range":{"start_line":285,"start_character":12,"end_line":285,"end_character":37},"updated":"2016-11-02 03:52:36.000000000","message":"I think we\u0027d better to add the local network id match(metadata) here. So that the non-related packet(not matched packet in non-external network) can just end in INGRESS_DESTINATION_PORT_LOOKUP_TABLE.","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dae9971132fc3a9ff9ddb6684e0373ff6e876511","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            # if it is the first floating ip on this node, then"},{"line_number":283,"context_line":"            # install the common goto flow rule."},{"line_number":284,"context_line":"            parser \u003d self.get_datapath().ofproto_parser"},{"line_number":285,"context_line":"            match \u003d parser.OFPMatch()"},{"line_number":286,"context_line":"            self.add_flow_go_to_table(self.get_datapath(),"},{"line_number":287,"context_line":"                const.INGRESS_DESTINATION_PORT_LOOKUP_TABLE,"},{"line_number":288,"context_line":"                const.PRIORITY_DEFAULT,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_47dc1c73","line":285,"range":{"start_line":285,"start_character":12,"end_line":285,"end_character":37},"in_reply_to":"ba5da102_35fbd548","updated":"2016-11-02 07:46:12.000000000","message":"I can do that, I thought it is OK since I added metadata\u003d\u003cID\u003e checks to all flows in ingress DNAT table 15, so no non-external packets can match there.","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b76dc01cc1abd6bc3827f262db5cc7ff24b51fb2","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            # remove the common goto flow rule."},{"line_number":300,"context_line":"            parser \u003d self.get_datapath().ofproto_parser"},{"line_number":301,"context_line":"            ofproto \u003d self.get_datapath().ofproto"},{"line_number":302,"context_line":"            match \u003d parser.OFPMatch()"},{"line_number":303,"context_line":"            self.mod_flow("},{"line_number":304,"context_line":"                self.get_datapath(),"},{"line_number":305,"context_line":"                command\u003dofproto.OFPFC_DELETE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_f58b1dc1","line":302,"range":{"start_line":302,"start_character":12,"end_line":302,"end_character":37},"updated":"2016-11-02 03:52:36.000000000","message":"If the match is empty here, actually all PRIORITY_DEFAULT flows will be deleted by this delete operation.","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"565f94b9565c0eb4237e364c37e088ef85f85313","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            # remove the common goto flow rule."},{"line_number":300,"context_line":"            parser \u003d self.get_datapath().ofproto_parser"},{"line_number":301,"context_line":"            ofproto \u003d self.get_datapath().ofproto"},{"line_number":302,"context_line":"            match \u003d parser.OFPMatch()"},{"line_number":303,"context_line":"            self.mod_flow("},{"line_number":304,"context_line":"                self.get_datapath(),"},{"line_number":305,"context_line":"                command\u003dofproto.OFPFC_DELETE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_10715176","line":302,"range":{"start_line":302,"start_character":12,"end_line":302,"end_character":37},"in_reply_to":"ba5da102_0744e418","updated":"2016-11-03 02:30:06.000000000","message":"Thanks, I think adding the metadata match is better, as we want to decouple the dnat app with other apps. If we don\u0027t add the metadata match, and (in future)other apps add PRIORITY_DEFAULT flows, dnat app might accidentally delete the flows added by other apps.","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dae9971132fc3a9ff9ddb6684e0373ff6e876511","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            # remove the common goto flow rule."},{"line_number":300,"context_line":"            parser \u003d self.get_datapath().ofproto_parser"},{"line_number":301,"context_line":"            ofproto \u003d self.get_datapath().ofproto"},{"line_number":302,"context_line":"            match \u003d parser.OFPMatch()"},{"line_number":303,"context_line":"            self.mod_flow("},{"line_number":304,"context_line":"                self.get_datapath(),"},{"line_number":305,"context_line":"                command\u003dofproto.OFPFC_DELETE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_0744e418","line":302,"range":{"start_line":302,"start_character":12,"end_line":302,"end_character":37},"in_reply_to":"ba5da102_f58b1dc1","updated":"2016-11-02 07:46:12.000000000","message":"At the moment, there are no PRIORITY_DEFAULT flows on table 7 other than redirect to table 15, but I\u0027ll add metadata\u003d\u003cID\u003e as above.","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"}],"dragonflow/controller/l2_ml2_app.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cc865196b83196f873ca0a21d8c56b0175efdeee","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"            const.INGRESS_DESTINATION_PORT_LOOKUP_TABLE)"},{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":"        inst \u003d [action_inst, goto_inst]"},{"line_number":1026,"context_line":"        self.mod_flow("},{"line_number":1027,"context_line":"            datapath\u003ddatapath,"},{"line_number":1028,"context_line":"            inst\u003dinst,"},{"line_number":1029,"context_line":"            table_id\u003dconst.INGRESS_CLASSIFICATION_DISPATCH_TABLE,"},{"line_number":1030,"context_line":"            priority\u003dconst.PRIORITY_LOW,"},{"line_number":1031,"context_line":"            match\u003dmatch)"},{"line_number":1032,"context_line":""},{"line_number":1033,"context_line":"    def _del_network_flows_for_vlan(self, segmentation_id, local_network_id):"},{"line_number":1034,"context_line":"        LOG.info(_LI(\"Delete network flows for vlan\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_f15d0a16","line":1031,"range":{"start_line":1026,"start_character":0,"end_line":1031,"end_character":24},"updated":"2016-11-01 12:52:45.000000000","message":"We should add this flow when\n1) the flat network has \"router:external\u003dTrue\"\n2) The first floatingip or first vm in the flat network is online.\n\nSo that, either the floatingip packet or the packet of vm in flat network can match this flow and then goto table 7.\n\nIn table 7, the packet can go to table 15(floatingip) or go to table 72(vm).\n\nTo be simple, we can just add this flow when the flat network has \"router:external\u003dTrue\", as we don\u0027t expect too many external networks.","commit_id":"7757b29565930c3bd7144f95b0ef6e8fa7a13df9"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b76dc01cc1abd6bc3827f262db5cc7ff24b51fb2","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        match \u003d self._get_multicast_broadcast_match(local_network_id)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":368,"context_line":"            self.db_store.get_network_global_id(local_network_id))"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":371,"context_line":"        if network.is_external():"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_50a9377a","line":368,"range":{"start_line":368,"start_character":12,"end_line":368,"end_character":66},"updated":"2016-11-02 03:52:36.000000000","message":"You can get the lswitch_id from api_nb.LogicalPort.get_lswitch_id","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b76dc01cc1abd6bc3827f262db5cc7ff24b51fb2","unresolved":false,"context_lines":[{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        # Ingress broadcast"},{"line_number":653,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":654,"context_line":"            self.db_store.get_network_global_id(network_id))"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":657,"context_line":"        if network.is_external():"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_90bd8fb9","line":654,"range":{"start_line":654,"start_character":11,"end_line":654,"end_character":60},"updated":"2016-11-02 03:52:36.000000000","message":"ditto","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b76dc01cc1abd6bc3827f262db5cc7ff24b51fb2","unresolved":false,"context_lines":[{"line_number":868,"context_line":"                                                               segmentation_id,"},{"line_number":869,"context_line":"                                                               ofport)"},{"line_number":870,"context_line":""},{"line_number":871,"context_line":"    def associate_floatingip(self, floatingip):"},{"line_number":872,"context_line":"        \u0027\u0027\u0027 TODO \u0027\u0027\u0027"},{"line_number":873,"context_line":"        lswitch \u003d self.db_store.get_lswitch("},{"line_number":874,"context_line":"            floatingip.get_floating_network_id())"},{"line_number":875,"context_line":"        local_network_id \u003d self.db_store.get_network_id(lswitch.get_id())"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        self._install_network_flows_on_first_port_up("},{"line_number":878,"context_line":"            lswitch.get_segment_id(),"},{"line_number":879,"context_line":"            lswitch.get_physical_network(),"},{"line_number":880,"context_line":"            lswitch.get_network_type(),"},{"line_number":881,"context_line":"            local_network_id)"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        # lport \u003d self.db_store.get_port(floatingip.get_floating_port_id())"},{"line_number":884,"context_line":"        network \u003d self.local_networks.setdefault(local_network_id, {})"},{"line_number":885,"context_line":"        local_ports \u003d network.setdefault(\u0027local\u0027, {})"},{"line_number":886,"context_line":"        local_ports[floatingip.get_floating_port_id()] \u003d FIP_PORT"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"    def disassociate_floatingip(self, floatingip):"},{"line_number":889,"context_line":"        lswitch \u003d self.db_store.get_lswitch("},{"line_number":890,"context_line":"            floatingip.get_floating_network_id())"},{"line_number":891,"context_line":"        local_network_id \u003d self.db_store.get_network_id(lswitch.get_id())"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if local_network_id not in self.local_networks:"},{"line_number":894,"context_line":"            return"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        local_network \u003d self.local_networks[local_network_id]"},{"line_number":897,"context_line":"        local_ports \u003d local_network.get(\u0027local\u0027)"},{"line_number":898,"context_line":"        local_ports.pop(floatingip.get_floating_port_id(), 0)"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"        remote_ports \u003d local_network.get(\u0027remote\u0027)"},{"line_number":901,"context_line":"        if not local_ports and not remote_ports:"},{"line_number":902,"context_line":"            self.local_networks.pop(local_network_id)"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        self._del_network_flows_on_last_port_down(local_network_id,"},{"line_number":905,"context_line":"                                                  lswitch.get_segment_id(),"},{"line_number":906,"context_line":"                                                  lswitch.get_network_type())"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _install_network_flows_on_first_port_up(self,"},{"line_number":909,"context_line":"                                                segmentation_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_50ee97b4","line":906,"range":{"start_line":871,"start_character":0,"end_line":906,"end_character":77},"updated":"2016-11-02 03:52:36.000000000","message":"To simplify the process, maybe we can just add flow to table 0 when the external network is created, and delete flow to table 0 when external network is deleted. This might be a bit redundant. But I think that is ok, as the external networks will not be too many. what do you think?","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dae9971132fc3a9ff9ddb6684e0373ff6e876511","unresolved":false,"context_lines":[{"line_number":868,"context_line":"                                                               segmentation_id,"},{"line_number":869,"context_line":"                                                               ofport)"},{"line_number":870,"context_line":""},{"line_number":871,"context_line":"    def associate_floatingip(self, floatingip):"},{"line_number":872,"context_line":"        \u0027\u0027\u0027 TODO \u0027\u0027\u0027"},{"line_number":873,"context_line":"        lswitch \u003d self.db_store.get_lswitch("},{"line_number":874,"context_line":"            floatingip.get_floating_network_id())"},{"line_number":875,"context_line":"        local_network_id \u003d self.db_store.get_network_id(lswitch.get_id())"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        self._install_network_flows_on_first_port_up("},{"line_number":878,"context_line":"            lswitch.get_segment_id(),"},{"line_number":879,"context_line":"            lswitch.get_physical_network(),"},{"line_number":880,"context_line":"            lswitch.get_network_type(),"},{"line_number":881,"context_line":"            local_network_id)"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        # lport \u003d self.db_store.get_port(floatingip.get_floating_port_id())"},{"line_number":884,"context_line":"        network \u003d self.local_networks.setdefault(local_network_id, {})"},{"line_number":885,"context_line":"        local_ports \u003d network.setdefault(\u0027local\u0027, {})"},{"line_number":886,"context_line":"        local_ports[floatingip.get_floating_port_id()] \u003d FIP_PORT"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"    def disassociate_floatingip(self, floatingip):"},{"line_number":889,"context_line":"        lswitch \u003d self.db_store.get_lswitch("},{"line_number":890,"context_line":"            floatingip.get_floating_network_id())"},{"line_number":891,"context_line":"        local_network_id \u003d self.db_store.get_network_id(lswitch.get_id())"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        if local_network_id not in self.local_networks:"},{"line_number":894,"context_line":"            return"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        local_network \u003d self.local_networks[local_network_id]"},{"line_number":897,"context_line":"        local_ports \u003d local_network.get(\u0027local\u0027)"},{"line_number":898,"context_line":"        local_ports.pop(floatingip.get_floating_port_id(), 0)"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"        remote_ports \u003d local_network.get(\u0027remote\u0027)"},{"line_number":901,"context_line":"        if not local_ports and not remote_ports:"},{"line_number":902,"context_line":"            self.local_networks.pop(local_network_id)"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        self._del_network_flows_on_last_port_down(local_network_id,"},{"line_number":905,"context_line":"                                                  lswitch.get_segment_id(),"},{"line_number":906,"context_line":"                                                  lswitch.get_network_type())"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _install_network_flows_on_first_port_up(self,"},{"line_number":909,"context_line":"                                                segmentation_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_a7897828","line":906,"range":{"start_line":871,"start_character":0,"end_line":906,"end_character":77},"in_reply_to":"ba5da102_50ee97b4","updated":"2016-11-02 07:46:12.000000000","message":"In theory I think it is OK, because there will be no rules to match in table 7 if there are no local ports.\nI\u0027ll do that if I can\u0027t get this code to look pretty and short. :)","commit_id":"1ae1b8390060c8865c4ad8fa768e186fa46a1d42"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3e0f1603912f0f94710932bec4d652217dd50551","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # Ingress broadcast"},{"line_number":362,"context_line":"        match \u003d self._get_multicast_broadcast_match(local_network_id)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":365,"context_line":"            self.db_store.get_network_global_id(local_network_id))"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":368,"context_line":"        # FIXME do this only if there are fips on the network"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_4b623ed9","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":66},"updated":"2016-11-03 02:31:35.000000000","message":"I still think we can get the network from lport at line 611. I think it is good to avoid adding method to public class(get_network_global_id in DBStore in this case).","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3e0f1603912f0f94710932bec4d652217dd50551","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":365,"context_line":"            self.db_store.get_network_global_id(local_network_id))"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":368,"context_line":"        # FIXME do this only if there are fips on the network"},{"line_number":369,"context_line":"        if network.is_external():"},{"line_number":370,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":371,"context_line":"                                                    const.INGRESS_NAT_TABLE)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_cb1f2e59","line":368,"range":{"start_line":367,"start_character":0,"end_line":368,"end_character":61},"updated":"2016-11-03 02:31:35.000000000","message":"Can we just get the number of fip in _LocalNetwork? If the number is greater than 0, then it must be an external network and there is fip in it.","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"164cabd387a3ae0a18918232fc06a251c17f46b4","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":365,"context_line":"            self.db_store.get_network_global_id(local_network_id))"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":368,"context_line":"        # FIXME do this only if there are fips on the network"},{"line_number":369,"context_line":"        if network.is_external():"},{"line_number":370,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":371,"context_line":"                                                    const.INGRESS_NAT_TABLE)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_a9003867","line":368,"range":{"start_line":367,"start_character":0,"end_line":368,"end_character":61},"in_reply_to":"ba5da102_b6d976f5","updated":"2016-11-03 10:37:32.000000000","message":"I see... Then I think current solution is good enough.","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"864eba33a285348d9fd4c699637c6ce95b08fb85","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":365,"context_line":"            self.db_store.get_network_global_id(local_network_id))"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":368,"context_line":"        # FIXME do this only if there are fips on the network"},{"line_number":369,"context_line":"        if network.is_external():"},{"line_number":370,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":371,"context_line":"                                                    const.INGRESS_NAT_TABLE)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_b6d976f5","line":368,"range":{"start_line":367,"start_character":0,"end_line":368,"end_character":61},"in_reply_to":"ba5da102_cb1f2e59","updated":"2016-11-03 08:59:41.000000000","message":"You\u0027re right, I\u0027m not sure we should do that though, because we\u0027ll have to update these flows when floating IPs are added or removed.\nWhat do you think?","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3e0f1603912f0f94710932bec4d652217dd50551","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                  \u0027local_network_id\u0027: str(local_network_id)})"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        network \u003d self.local_networks.get(local_network_id)"},{"line_number":549,"context_line":"        if network and (network.local_ports or network.fips):"},{"line_number":550,"context_line":"            return"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"        if network_type \u003d\u003d \u0027vlan\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_6b462250","line":549,"range":{"start_line":549,"start_character":22,"end_line":549,"end_character":60},"updated":"2016-11-03 02:31:35.000000000","message":"Can this be a method in _LocalNetwork? such as\n\ndef is_network_in_use_locally(self):\n    return self.local_ports or self.fips","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"864eba33a285348d9fd4c699637c6ce95b08fb85","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                  \u0027local_network_id\u0027: str(local_network_id)})"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        network \u003d self.local_networks.get(local_network_id)"},{"line_number":549,"context_line":"        if network and (network.local_ports or network.fips):"},{"line_number":550,"context_line":"            return"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"        if network_type \u003d\u003d \u0027vlan\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_56e73aab","line":549,"range":{"start_line":549,"start_character":22,"end_line":549,"end_character":60},"in_reply_to":"ba5da102_6b462250","updated":"2016-11-03 08:59:41.000000000","message":"Will add","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3e0f1603912f0f94710932bec4d652217dd50551","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            match\u003dmatch)"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"        # Ingress broadcast"},{"line_number":641,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":642,"context_line":"            self.db_store.get_network_global_id(network_id))"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":645,"context_line":"        # FIXME do this only if there are fips on the network"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_6b5d4214","line":642,"range":{"start_line":641,"start_character":0,"end_line":642,"end_character":60},"updated":"2016-11-03 02:31:35.000000000","message":"see comments above","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"864eba33a285348d9fd4c699637c6ce95b08fb85","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            match\u003dmatch)"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"        # Ingress broadcast"},{"line_number":641,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":642,"context_line":"            self.db_store.get_network_global_id(network_id))"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":645,"context_line":"        # FIXME do this only if there are fips on the network"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_914e3c39","line":642,"range":{"start_line":641,"start_character":0,"end_line":642,"end_character":60},"in_reply_to":"ba5da102_6b5d4214","updated":"2016-11-03 08:59:41.000000000","message":"Done :)","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3e0f1603912f0f94710932bec4d652217dd50551","unresolved":false,"context_lines":[{"line_number":641,"context_line":"        network \u003d self.db_store.get_lswitch("},{"line_number":642,"context_line":"            self.db_store.get_network_global_id(network_id))"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":645,"context_line":"        # FIXME do this only if there are fips on the network"},{"line_number":646,"context_line":"        if network.is_external():"},{"line_number":647,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":648,"context_line":"                                                    const.INGRESS_NAT_TABLE)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_aba11afa","line":645,"range":{"start_line":644,"start_character":0,"end_line":645,"end_character":61},"updated":"2016-11-03 02:31:35.000000000","message":"see comments above","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3e0f1603912f0f94710932bec4d652217dd50551","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_network_type(),"},{"line_number":860,"context_line":"            local_network_id)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        self._get_initialized_local_network(local_network_id).fips.add("},{"line_number":863,"context_line":"            floatingip.get_floating_port_id())"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"    def disassociate_floatingip(self, floatingip):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_abef5a1c","line":862,"range":{"start_line":862,"start_character":8,"end_line":862,"end_character":67},"updated":"2016-11-03 02:31:35.000000000","message":"I think it could be wrapped in a method in _LocalNetwork.","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"164cabd387a3ae0a18918232fc06a251c17f46b4","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_network_type(),"},{"line_number":860,"context_line":"            local_network_id)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        self._get_initialized_local_network(local_network_id).fips.add("},{"line_number":863,"context_line":"            floatingip.get_floating_port_id())"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"    def disassociate_floatingip(self, floatingip):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_294428b5","line":862,"range":{"start_line":862,"start_character":8,"end_line":862,"end_character":67},"in_reply_to":"ba5da102_11506c0a","updated":"2016-11-03 10:37:32.000000000","message":"It is actually not much value, only some cosmetic change(IMO). I am ok with either way, if you think it is not necessary. And I think the code will look better if you update the _get_initialized_local_network in dependent patch.","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"864eba33a285348d9fd4c699637c6ce95b08fb85","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_network_type(),"},{"line_number":860,"context_line":"            local_network_id)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        self._get_initialized_local_network(local_network_id).fips.add("},{"line_number":863,"context_line":"            floatingip.get_floating_port_id())"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"    def disassociate_floatingip(self, floatingip):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_11506c0a","line":862,"range":{"start_line":862,"start_character":8,"end_line":862,"end_character":67},"in_reply_to":"ba5da102_abef5a1c","updated":"2016-11-03 08:59:41.000000000","message":"I can wrap this with some methods but local_ports and remote_ports are used directly as well, and I don\u0027t think it brings much value at the moment since all we do is add/remove elements.","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3e0f1603912f0f94710932bec4d652217dd50551","unresolved":false,"context_lines":[{"line_number":889,"context_line":"                                                local_network_id):"},{"line_number":890,"context_line":"        LOG.info(_LI(\u0027Install network flows on first port up.\u0027))"},{"line_number":891,"context_line":"        network \u003d self.local_networks.get(local_network_id)"},{"line_number":892,"context_line":"        if network and (network.local_ports or network.fips):"},{"line_number":893,"context_line":"            return"},{"line_number":894,"context_line":""},{"line_number":895,"context_line":"        if network_type \u003d\u003d \u0027vlan\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_eb7eb268","line":892,"range":{"start_line":892,"start_character":23,"end_line":892,"end_character":60},"updated":"2016-11-03 02:31:35.000000000","message":"see comments above","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"864eba33a285348d9fd4c699637c6ce95b08fb85","unresolved":false,"context_lines":[{"line_number":889,"context_line":"                                                local_network_id):"},{"line_number":890,"context_line":"        LOG.info(_LI(\u0027Install network flows on first port up.\u0027))"},{"line_number":891,"context_line":"        network \u003d self.local_networks.get(local_network_id)"},{"line_number":892,"context_line":"        if network and (network.local_ports or network.fips):"},{"line_number":893,"context_line":"            return"},{"line_number":894,"context_line":""},{"line_number":895,"context_line":"        if network_type \u003d\u003d \u0027vlan\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_d14a7454","line":892,"range":{"start_line":892,"start_character":23,"end_line":892,"end_character":60},"in_reply_to":"ba5da102_eb7eb268","updated":"2016-11-03 08:59:41.000000000","message":"+1","commit_id":"1c3fcc2f9f5d745992271c4540d2789ed6d33b89"},{"author":{"_account_id":22060,"name":"jingting","email":"kangjingting@huawei.com","username":"jingting"},"change_message_id":"30f3ba08f239f5f4dfc0aade64601e1512607179","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_segment_id(),"},{"line_number":860,"context_line":"            lswitch.get_physical_network(),"},{"line_number":861,"context_line":"            lswitch.get_network_type(),"},{"line_number":862,"context_line":"            local_network_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        self.local_networks[local_network_id].fips.add("},{"line_number":865,"context_line":"            floatingip.get_floating_port_id())"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_62c0c77d","line":862,"updated":"2016-11-04 10:40:10.000000000","message":"why not put this code into dnat_app?","commit_id":"1d7f4cdc9144302256389b0b0d56b9af62f97970"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ae16d0cadb1b1b13e3157ba4817b910a7830820e","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_segment_id(),"},{"line_number":860,"context_line":"            lswitch.get_physical_network(),"},{"line_number":861,"context_line":"            lswitch.get_network_type(),"},{"line_number":862,"context_line":"            local_network_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        self.local_networks[local_network_id].fips.add("},{"line_number":865,"context_line":"            floatingip.get_floating_port_id())"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_4f082a92","line":862,"in_reply_to":"ba5da102_4349ec8d","updated":"2016-11-06 06:12:39.000000000","message":"The floating port of the FIP is a virtual one and is never created (no chassis) so there is nothing to ensure a port exists in the network.","commit_id":"1d7f4cdc9144302256389b0b0d56b9af62f97970"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"8c9034ce59f7db4fce04024773bc23b86ee7b300","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_segment_id(),"},{"line_number":860,"context_line":"            lswitch.get_physical_network(),"},{"line_number":861,"context_line":"            lswitch.get_network_type(),"},{"line_number":862,"context_line":"            local_network_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        self.local_networks[local_network_id].fips.add("},{"line_number":865,"context_line":"            floatingip.get_floating_port_id())"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_0a1700ee","line":862,"in_reply_to":"ba5da102_4f082a92","updated":"2016-11-06 08:52:10.000000000","message":"I think it is the right thing here. Although it is floatingip, we need to update the L2 domain of external network. It is not about the L3 thing here.","commit_id":"1d7f4cdc9144302256389b0b0d56b9af62f97970"},{"author":{"_account_id":22060,"name":"jingting","email":"kangjingting@huawei.com","username":"jingting"},"change_message_id":"add0bce48d73e40178907098d055138d911d36e3","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_segment_id(),"},{"line_number":860,"context_line":"            lswitch.get_physical_network(),"},{"line_number":861,"context_line":"            lswitch.get_network_type(),"},{"line_number":862,"context_line":"            local_network_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        self.local_networks[local_network_id].fips.add("},{"line_number":865,"context_line":"            floatingip.get_floating_port_id())"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_4349ec8d","line":862,"in_reply_to":"ba5da102_628527ac","updated":"2016-11-05 07:25:56.000000000","message":"The association step must be after the port creation, I think this part maybe not needed","commit_id":"1d7f4cdc9144302256389b0b0d56b9af62f97970"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"f0bd612fb233fa47a496f98f7874e41840a21d4b","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            lswitch.get_segment_id(),"},{"line_number":860,"context_line":"            lswitch.get_physical_network(),"},{"line_number":861,"context_line":"            lswitch.get_network_type(),"},{"line_number":862,"context_line":"            local_network_id)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        self.local_networks[local_network_id].fips.add("},{"line_number":865,"context_line":"            floatingip.get_floating_port_id())"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_628527ac","line":862,"in_reply_to":"ba5da102_62c0c77d","updated":"2016-11-04 11:02:18.000000000","message":"We need to maintain flows from table 0 to table 7 when there are floating IPs present on the specific provider network.\nIf L2App is unaware of the floating IPs, it will remove the relevant flows (or won\u0027t install them in the first place) and DNAT won\u0027t be able to get its packets from table 7.","commit_id":"1d7f4cdc9144302256389b0b0d56b9af62f97970"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"3a71b18c_1f985677","updated":"2016-12-07 10:04:21.000000000","message":"The changes here weaken the separation between the responsibilities of dNAT app and l2 app. I think this needs further consideration.","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"3a71b18c_7d837656","in_reply_to":"3a71b18c_1f985677","updated":"2016-12-11 09:54:19.000000000","message":"I agree, maybe we should make the floating port with chassis and force l2 app to create the appropriate flows based on its presence.","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":333,"context_line":"        if lswitch.is_external():"},{"line_number":334,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":335,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":336,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_5fe64e44","line":334,"updated":"2016-12-07 10:04:21.000000000","message":"I think OFPInstructionGotoTable is preferable.","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":333,"context_line":"        if lswitch.is_external():"},{"line_number":334,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":335,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":336,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_dd7e4a69","line":334,"in_reply_to":"3a71b18c_5fe64e44","updated":"2016-12-11 09:54:19.000000000","message":"Will change","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        if lswitch.is_external():"},{"line_number":334,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":335,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":336,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        match \u003d self._get_multicast_broadcast_match(local_network_id)"},{"line_number":339,"context_line":"        ingress_inst \u003d [parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_ff271a60","line":336,"updated":"2016-12-07 10:04:21.000000000","message":"If you need this action first why not move this block further up?","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        if lswitch.is_external():"},{"line_number":334,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":335,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":336,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        match \u003d self._get_multicast_broadcast_match(local_network_id)"},{"line_number":339,"context_line":"        ingress_inst \u003d [parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_fd97868d","line":336,"in_reply_to":"3a71b18c_ff271a60","updated":"2016-12-11 09:54:19.000000000","message":"Agree","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":609,"context_line":"        if lswitch.is_external():"},{"line_number":610,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":611,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":612,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":613,"context_line":"        match \u003d self._get_multicast_broadcast_match(network_id)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_dfc89eaa","line":610,"updated":"2016-12-07 10:04:21.000000000","message":"Same here","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        # Send copy to DNAT if the network is public"},{"line_number":609,"context_line":"        if lswitch.is_external():"},{"line_number":610,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":611,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":612,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":613,"context_line":"        match \u003d self._get_multicast_broadcast_match(network_id)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_1d952286","line":610,"in_reply_to":"3a71b18c_dfc89eaa","updated":"2016-12-11 09:54:19.000000000","message":"+1","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":609,"context_line":"        if lswitch.is_external():"},{"line_number":610,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":611,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":612,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":613,"context_line":"        match \u003d self._get_multicast_broadcast_match(network_id)"},{"line_number":614,"context_line":"        ingress_inst \u003d [parser.OFPInstructionActions("},{"line_number":615,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, ingress)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_9fd5461d","line":612,"updated":"2016-12-07 10:04:21.000000000","message":"And here","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":609,"context_line":"        if lswitch.is_external():"},{"line_number":610,"context_line":"            goto_dnat \u003d parser.NXActionResubmitTable(OF_IN_PORT,"},{"line_number":611,"context_line":"                                                    const.INGRESS_NAT_TABLE)"},{"line_number":612,"context_line":"            ingress.insert(0, goto_dnat)"},{"line_number":613,"context_line":"        match \u003d self._get_multicast_broadcast_match(network_id)"},{"line_number":614,"context_line":"        ingress_inst \u003d [parser.OFPInstructionActions("},{"line_number":615,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, ingress)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_3d8e5e79","line":612,"in_reply_to":"3a71b18c_9fd5461d","updated":"2016-12-11 09:54:19.000000000","message":"+1","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"}],"dragonflow/tests/fullstack/test_apps.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"fc9454ce4cefd015b970866402fbb5c9c1779328","unresolved":false,"context_lines":[{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"        params \u003d {\u0027name\u0027: \u0027public\u0027,"},{"line_number":1227,"context_line":"                  \u0027router:external\u0027: True,"},{"line_number":1228,"context_line":"                  \u0027provider:network_type\u0027: \u0027flat\u0027,"},{"line_number":1229,"context_line":"                  \u0027provider:physical_network\u0027: \u0027public\u0027}"},{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"        network.create(params)"},{"line_number":1232,"context_line":"        self.assertTrue(network.exists())"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a74a57a_07dbcf1b","line":1229,"range":{"start_line":1228,"start_character":0,"end_line":1229,"end_character":56},"updated":"2016-11-28 23:32:11.000000000","message":"Does it have to be flat network with physical network? (The problem is that there is no such physical network *public* in the env.) In my devstack, it is just a vxlan network without physical network.","commit_id":"109d847c4a1fb780ca88b9a4d208f584a3df6694"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"caf9bd93ab7a4b09e4425857d3e96b9b01160509","unresolved":false,"context_lines":[{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"        params \u003d {\u0027name\u0027: \u0027public\u0027,"},{"line_number":1227,"context_line":"                  \u0027router:external\u0027: True,"},{"line_number":1228,"context_line":"                  \u0027provider:network_type\u0027: \u0027flat\u0027,"},{"line_number":1229,"context_line":"                  \u0027provider:physical_network\u0027: \u0027public\u0027}"},{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"        network.create(params)"},{"line_number":1232,"context_line":"        self.assertTrue(network.exists())"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a74a57a_e484fb5e","line":1229,"range":{"start_line":1228,"start_character":0,"end_line":1229,"end_character":56},"in_reply_to":"5a74a57a_07dbcf1b","updated":"2016-11-29 10:30:26.000000000","message":"I though public is the network accessible through br-ex, but it is not defined in l2_app/bridge_mappings configuration by devstack (I have a patch I didn\u0027t sent yet).\n\n\u0027public\u0027 appears in the list of ml2_type_flat/flat_networks configured by default so it is possible to create this public network.\n\nAbout the type, it can be any supported provider network type, but we need to be able to send packets into this network and it is easiest to configure flat network.","commit_id":"109d847c4a1fb780ca88b9a4d208f584a3df6694"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"8179a8ff4ac4931c3a9da5e22f2fb682226662c0","unresolved":false,"context_lines":[{"line_number":1228,"context_line":"                  \u0027provider:network_type\u0027: \u0027flat\u0027,"},{"line_number":1229,"context_line":"                  \u0027provider:physical_network\u0027: \u0027public\u0027}"},{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"        network.create(params)"},{"line_number":1232,"context_line":"        self.assertTrue(network.exists())"},{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"        # Create an IPv4 subnet in the external network"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_5855fdf7","line":1231,"range":{"start_line":1231,"start_character":8,"end_line":1231,"end_character":30},"updated":"2016-12-05 03:10:52.000000000","message":"suggest you first check if there is a \u0027public\u0027 external network. if so, you can reuse it. otherwise, it will throw exception.","commit_id":"109d847c4a1fb780ca88b9a4d208f584a3df6694"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e55a946d0a25b86845562357705c9a804c37ad31","unresolved":false,"context_lines":[{"line_number":1228,"context_line":"                  \u0027provider:network_type\u0027: \u0027flat\u0027,"},{"line_number":1229,"context_line":"                  \u0027provider:physical_network\u0027: \u0027public\u0027}"},{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"        network.create(params)"},{"line_number":1232,"context_line":"        self.assertTrue(network.exists())"},{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"        # Create an IPv4 subnet in the external network"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a71b18c_c853e315","line":1231,"range":{"start_line":1231,"start_character":8,"end_line":1231,"end_character":30},"in_reply_to":"3a71b18c_5855fdf7","updated":"2016-12-06 08:24:43.000000000","message":"I check if there\u0027s a network available on line 1215, but you\u0027re right, it will throw, an exception if there is no external network but public network already exists. I think it is a reasonable assumption for CI/devstack that there is not such network or it exists and external","commit_id":"109d847c4a1fb780ca88b9a4d208f584a3df6694"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":1228,"context_line":"                  \u0027provider:network_type\u0027: \u0027flat\u0027,"},{"line_number":1229,"context_line":"                  \u0027provider:physical_network\u0027: \u0027public\u0027}"},{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"        network.create(params)"},{"line_number":1232,"context_line":"        self.assertTrue(network.exists())"},{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"        # Create an IPv4 subnet in the external network"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_9fdf060c","line":1231,"updated":"2016-12-07 10:04:21.000000000","message":"I\u0027m confused - are you taking an existing external network, or creating a new one?","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":1228,"context_line":"                  \u0027provider:network_type\u0027: \u0027flat\u0027,"},{"line_number":1229,"context_line":"                  \u0027provider:physical_network\u0027: \u0027public\u0027}"},{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"        network.create(params)"},{"line_number":1232,"context_line":"        self.assertTrue(network.exists())"},{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"        # Create an IPv4 subnet in the external network"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_fd3b06cf","line":1231,"in_reply_to":"3a71b18c_9fdf060c","updated":"2016-12-11 09:54:19.000000000","message":"If there is one, I use it, otherwise I create a new one.","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"        self.assertTrue(subnet.exists())"},{"line_number":1245,"context_line":""},{"line_number":1246,"context_line":"        # Bring br-ex up and assign address"},{"line_number":1247,"context_line":"        test_utils.print_command("},{"line_number":1248,"context_line":"            [\u0027ip\u0027, \u0027addr\u0027, \u0027add\u0027, \u0027172.24.4.1/24\u0027, \u0027dev\u0027, \u0027br-ex\u0027],"},{"line_number":1249,"context_line":"            run_as_root\u003dTrue)"},{"line_number":1250,"context_line":"        test_utils.print_command("}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_bf304257","line":1247,"updated":"2016-12-07 10:04:21.000000000","message":"These commands aren\u0027t stricty \u0027print\u0027. Why not use utils.execute directly?","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"        self.assertTrue(subnet.exists())"},{"line_number":1245,"context_line":""},{"line_number":1246,"context_line":"        # Bring br-ex up and assign address"},{"line_number":1247,"context_line":"        test_utils.print_command("},{"line_number":1248,"context_line":"            [\u0027ip\u0027, \u0027addr\u0027, \u0027add\u0027, \u0027172.24.4.1/24\u0027, \u0027dev\u0027, \u0027br-ex\u0027],"},{"line_number":1249,"context_line":"            run_as_root\u003dTrue)"},{"line_number":1250,"context_line":"        test_utils.print_command("}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_1d39a2d7","line":1247,"in_reply_to":"3a71b18c_bf304257","updated":"2016-12-11 09:54:19.000000000","message":"Will change","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":1251,"context_line":"            [\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027, \u0027dev\u0027, \u0027br-ex\u0027, \u0027up\u0027],"},{"line_number":1252,"context_line":"            run_as_root\u003dTrue)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"        def clean_tap():"},{"line_number":1255,"context_line":"            test_utils.print_command("},{"line_number":1256,"context_line":"                [\u0027ip\u0027, \u0027addr\u0027, \u0027del\u0027, \u0027172.24.4.1/24\u0027, \u0027dev\u0027, \u0027br-ex\u0027],"},{"line_number":1257,"context_line":"                run_as_root\u003dTrue)"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"        self.store(\u0027tap\u0027, close_func\u003dclean_tap)"},{"line_number":1260,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_1f2936e6","line":1257,"range":{"start_line":1254,"start_character":0,"end_line":1257,"end_character":33},"updated":"2016-12-07 10:04:21.000000000","message":"Looks like a job for functools.partial","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":1251,"context_line":"            [\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027, \u0027dev\u0027, \u0027br-ex\u0027, \u0027up\u0027],"},{"line_number":1252,"context_line":"            run_as_root\u003dTrue)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"        def clean_tap():"},{"line_number":1255,"context_line":"            test_utils.print_command("},{"line_number":1256,"context_line":"                [\u0027ip\u0027, \u0027addr\u0027, \u0027del\u0027, \u0027172.24.4.1/24\u0027, \u0027dev\u0027, \u0027br-ex\u0027],"},{"line_number":1257,"context_line":"                run_as_root\u003dTrue)"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"        self.store(\u0027tap\u0027, close_func\u003dclean_tap)"},{"line_number":1260,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_3d32def2","line":1257,"range":{"start_line":1254,"start_character":0,"end_line":1257,"end_character":33},"in_reply_to":"3a71b18c_1f2936e6","updated":"2016-12-11 09:54:19.000000000","message":"Will change","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"        security_group \u003d self.store(objects.SecGroupTestObj("},{"line_number":1270,"context_line":"            self.neutron,"},{"line_number":1271,"context_line":"            self.nb_api))"},{"line_number":1272,"context_line":"        security_group_id \u003d security_group.create()"},{"line_number":1273,"context_line":"        self.assertTrue(security_group.exists())"},{"line_number":1274,"context_line":""},{"line_number":1275,"context_line":"        ingress_rule_info \u003d {"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_3f6b521f","line":1272,"updated":"2016-12-07 10:04:21.000000000","message":"In the past we needed to add a pause in these situations for stability, JFYI.","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2f3fe6d4c4342f4a647b1eacfd96208e6ebd376f","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"                key: app_testing_objects.PortPolicy("},{"line_number":1426,"context_line":"                    rules\u003d["},{"line_number":1427,"context_line":"                        app_testing_objects.PortPolicyRule("},{"line_number":1428,"context_line":"                            _Filter(),"},{"line_number":1429,"context_line":"                            actions\u003d["},{"line_number":1430,"context_line":"                                app_testing_objects.LogAction(),"},{"line_number":1431,"context_line":"                                app_testing_objects.SendAction("}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_bfc122e6","line":1428,"range":{"start_line":1428,"start_character":0,"end_line":1428,"end_character":38},"updated":"2016-12-07 10:04:21.000000000","message":"I think it\u0027s safe to pass a function here, rather than a class with __call__ (less overhead, cleaner code)\n\nAlternatively _Filter can be made more general, e.g. FilterUDPPort(port).","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"716d72ac2ccc7eab55638d65e256984000cd1dc9","unresolved":false,"context_lines":[{"line_number":1425,"context_line":"                key: app_testing_objects.PortPolicy("},{"line_number":1426,"context_line":"                    rules\u003d["},{"line_number":1427,"context_line":"                        app_testing_objects.PortPolicyRule("},{"line_number":1428,"context_line":"                            _Filter(),"},{"line_number":1429,"context_line":"                            actions\u003d["},{"line_number":1430,"context_line":"                                app_testing_objects.LogAction(),"},{"line_number":1431,"context_line":"                                app_testing_objects.SendAction("}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_5d2f9a87","line":1428,"range":{"start_line":1428,"start_character":0,"end_line":1428,"end_character":38},"in_reply_to":"3a71b18c_bfc122e6","updated":"2016-12-11 09:54:19.000000000","message":"I\u0027ll make it a function","commit_id":"d2b888e2eb2214570fdc139862083c165c6c0e7e"}]}
