)]}'
{"neutron/agent/l3_agent.py":[{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"86ac0c2147bd37c28f894c0a26ad4c472b83d2c3","unresolved":false,"context_lines":[{"line_number":1512,"context_line":"        device.route.add_gateway(str(fip_2_rtr.ip), table\u003dFIP_RT_TBL)"},{"line_number":1513,"context_line":"        #setup the NAT rules and chains"},{"line_number":1514,"context_line":"        self._handle_router_fip_nat_rules(ri, rtr_2_fip_name, \u0027add_rules\u0027)"},{"line_number":1515,"context_line":"        # kicks the FW Agent to add rules for the IR namespace if configured"},{"line_number":1516,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1517,"context_line":""},{"line_number":1518,"context_line":"    def floating_ip_added_dist(self, ri, fip):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_6f791b93","line":1515,"updated":"2014-09-01 05:55:53.000000000","message":"IR -\u003e qr-*\n\nmight be more in sync with what we actually observe","commit_id":"96caeea9e69792727197266d97384929217f655f"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"be2db36c0ee5690843776f54f893cf5defa8d2b3","unresolved":false,"context_lines":[{"line_number":1512,"context_line":"        device.route.add_gateway(str(fip_2_rtr.ip), table\u003dFIP_RT_TBL)"},{"line_number":1513,"context_line":"        #setup the NAT rules and chains"},{"line_number":1514,"context_line":"        self._handle_router_fip_nat_rules(ri, rtr_2_fip_name, \u0027add_rules\u0027)"},{"line_number":1515,"context_line":"        # kicks the FW Agent to add rules for the IR namespace if configured"},{"line_number":1516,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1517,"context_line":""},{"line_number":1518,"context_line":"    def floating_ip_added_dist(self, ri, fip):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_52ff5e67","line":1515,"in_reply_to":"fa98f980_6f791b93","updated":"2014-09-02 06:01:38.000000000","message":"Thanks Sumit, since the dvr folks consistently refer to this as IR - will leave it for now. Perhaps with a clarification from them will change - we want to distinguish with the legacy namespace (which is also qr-) But i agree on this - as i was confused too.","commit_id":"96caeea9e69792727197266d97384929217f655f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a093224efada192ea52b5efd6e26cf95cf80b53c","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                                     snat_ns_name, preserve_ips\u003d[])"},{"line_number":1197,"context_line":"        ri.snat_iptables_manager \u003d iptables_manager.IptablesManager("},{"line_number":1198,"context_line":"            root_helper\u003dself.root_helper,"},{"line_number":1199,"context_line":"            namespace\u003dsnat_ns_name,"},{"line_number":1200,"context_line":"            use_ipv6\u003dself.use_ipv6)"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"    def external_gateway_added(self, ri, ex_gw_port, interface_name):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_cadb3c7a","line":1199,"updated":"2014-09-03 23:22:55.000000000","message":"As we discussed today, probably you may have to add \"process_router_add from your Super class in here\" for the firewall agent to act upon when there is an Snat namespace.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"c6c0c794607369addceb6d45c65a57257bea691f","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                                     snat_ns_name, preserve_ips\u003d[])"},{"line_number":1197,"context_line":"        ri.snat_iptables_manager \u003d iptables_manager.IptablesManager("},{"line_number":1198,"context_line":"            root_helper\u003dself.root_helper,"},{"line_number":1199,"context_line":"            namespace\u003dsnat_ns_name,"},{"line_number":1200,"context_line":"            use_ipv6\u003dself.use_ipv6)"},{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"    def external_gateway_added(self, ri, ex_gw_port, interface_name):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_aacfd87d","line":1199,"in_reply_to":"fa98f980_cadb3c7a","updated":"2014-09-03 23:32:22.000000000","message":"Thanks Swami - have done that and testing with that.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"d65cfe561081d35423ffbce05e7cbf6adefc2d34","unresolved":false,"context_lines":[{"line_number":1197,"context_line":"        ri.snat_iptables_manager \u003d iptables_manager.IptablesManager("},{"line_number":1198,"context_line":"            root_helper\u003dself.root_helper,"},{"line_number":1199,"context_line":"            namespace\u003dsnat_ns_name,"},{"line_number":1200,"context_line":"            use_ipv6\u003dself.use_ipv6)"},{"line_number":1201,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    def external_gateway_added(self, ri, ex_gw_port, interface_name):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_3157bc59","line":1200,"updated":"2014-09-04 23:01:32.000000000","message":"if you do post another patch, you can add a comment here as well like in L1517","commit_id":"86276a59656ec3733302b9631efa09a180dfbe12"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"9fdee0d416ada0aaa9ace54ee303ee3e744216fa","unresolved":false,"context_lines":[{"line_number":1197,"context_line":"        ri.snat_iptables_manager \u003d iptables_manager.IptablesManager("},{"line_number":1198,"context_line":"            root_helper\u003dself.root_helper,"},{"line_number":1199,"context_line":"            namespace\u003dsnat_ns_name,"},{"line_number":1200,"context_line":"            use_ipv6\u003dself.use_ipv6)"},{"line_number":1201,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    def external_gateway_added(self, ri, ex_gw_port, interface_name):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_e20e40e4","line":1200,"in_reply_to":"fa98f980_3157bc59","updated":"2014-09-04 23:46:43.000000000","message":"Thanks Sumit - done.","commit_id":"86276a59656ec3733302b9631efa09a180dfbe12"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a516db2298ef1aaeb68e3a8b8a8cf98d69444da2","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            namespace\u003dsnat_ns_name,"},{"line_number":1200,"context_line":"            use_ipv6\u003dself.use_ipv6)"},{"line_number":1201,"context_line":"        # kicks the FW Agent to add rules for the snat namespace"},{"line_number":1202,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1203,"context_line":""},{"line_number":1204,"context_line":"    def external_gateway_added(self, ri, ex_gw_port, interface_name):"},{"line_number":1205,"context_line":"        if ri.router[\u0027distributed\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_5cd6bbc6","line":1202,"updated":"2014-09-08 21:25:26.000000000","message":"Why call super here?  Why not just self.process_router_add(ri).  This could be a surprise if this class were ever to need to override process_router_add.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"a99b704f4b3ccc7039a39132cd0d23d189bdd852","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            namespace\u003dsnat_ns_name,"},{"line_number":1200,"context_line":"            use_ipv6\u003dself.use_ipv6)"},{"line_number":1201,"context_line":"        # kicks the FW Agent to add rules for the snat namespace"},{"line_number":1202,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1203,"context_line":""},{"line_number":1204,"context_line":"    def external_gateway_added(self, ri, ex_gw_port, interface_name):"},{"line_number":1205,"context_line":"        if ri.router[\u0027distributed\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_ad19247b","line":1202,"in_reply_to":"fa98f980_5cd6bbc6","updated":"2014-09-09 07:23:22.000000000","message":"Thanks Carl. This was really an artifact for some very early plans on how FWaaS and VPN would coexist. The original instance:\nhttps://github.com/openstack/neutron/blob/master/neutron/agent/l3_agent.py#L735\n\nwhich i originated earlier and replicated now. But u are absolutely correct there is no need to do this. I was kind of stuck in a local minima and did not realize this - thanks for pointing this out. I went ahead and fixed the original instance as we rely on that in this context as well. I will do some further cleanup here in the original implementation as a separate patch.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a516db2298ef1aaeb68e3a8b8a8cf98d69444da2","unresolved":false,"context_lines":[{"line_number":1523,"context_line":"        #setup the NAT rules and chains"},{"line_number":1524,"context_line":"        self._handle_router_fip_nat_rules(ri, rtr_2_fip_name, \u0027add_rules\u0027)"},{"line_number":1525,"context_line":"        # kicks the FW Agent to add rules for the IR namespace if configured"},{"line_number":1526,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1527,"context_line":""},{"line_number":1528,"context_line":"    def floating_ip_added_dist(self, ri, fip):"},{"line_number":1529,"context_line":"        \"\"\"Add floating IP to FIP namespace.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_7cda9fea","line":1526,"updated":"2014-09-08 21:25:26.000000000","message":"Ditto.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"a99b704f4b3ccc7039a39132cd0d23d189bdd852","unresolved":false,"context_lines":[{"line_number":1523,"context_line":"        #setup the NAT rules and chains"},{"line_number":1524,"context_line":"        self._handle_router_fip_nat_rules(ri, rtr_2_fip_name, \u0027add_rules\u0027)"},{"line_number":1525,"context_line":"        # kicks the FW Agent to add rules for the IR namespace if configured"},{"line_number":1526,"context_line":"        super(L3NATAgent, self).process_router_add(ri)"},{"line_number":1527,"context_line":""},{"line_number":1528,"context_line":"    def floating_ip_added_dist(self, ri, fip):"},{"line_number":1529,"context_line":"        \"\"\"Add floating IP to FIP namespace.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_cd2588af","line":1526,"in_reply_to":"fa98f980_7cda9fea","updated":"2014-09-09 07:23:22.000000000","message":"Done","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"}],"neutron/services/firewall/agents/l3reference/firewall_l3_agent.py":[{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"86ac0c2147bd37c28f894c0a26ad4c472b83d2c3","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            # call into the driver"},{"line_number":141,"context_line":"            try:"},{"line_number":142,"context_line":"                self.fwaas_driver.__getattribute__(func_name)("},{"line_number":143,"context_line":"                    self.conf.agent_mode,"},{"line_number":144,"context_line":"                    router_info_list,"},{"line_number":145,"context_line":"                    fw)"},{"line_number":146,"context_line":"                if fw[\u0027admin_state_up\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_cf6cc739","line":143,"updated":"2014-09-01 05:55:53.000000000","message":"we need to update some of the UTs for these changes","commit_id":"96caeea9e69792727197266d97384929217f655f"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"be2db36c0ee5690843776f54f893cf5defa8d2b3","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            # call into the driver"},{"line_number":141,"context_line":"            try:"},{"line_number":142,"context_line":"                self.fwaas_driver.__getattribute__(func_name)("},{"line_number":143,"context_line":"                    self.conf.agent_mode,"},{"line_number":144,"context_line":"                    router_info_list,"},{"line_number":145,"context_line":"                    fw)"},{"line_number":146,"context_line":"                if fw[\u0027admin_state_up\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_0d75b797","line":143,"in_reply_to":"fa98f980_cf6cc739","updated":"2014-09-02 06:01:38.000000000","message":"Thanks Sumit. Done.","commit_id":"96caeea9e69792727197266d97384929217f655f"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"86ac0c2147bd37c28f894c0a26ad4c472b83d2c3","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                status)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _process_router_add(self, ri):"},{"line_number":216,"context_line":"        \"\"\"On router add, get fw with rules from plugin and update driver.\"\"\""},{"line_number":217,"context_line":"        LOG.debug(_(\"Process router add, router_id: \u0027%s\u0027\"), ri.router[\u0027id\u0027])"},{"line_number":218,"context_line":"        routers \u003d []"},{"line_number":219,"context_line":"        routers.append(ri.router)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_9ab4bff3","line":216,"updated":"2014-09-01 05:55:53.000000000","message":"do we need to check here that there is no mixed mode?","commit_id":"96caeea9e69792727197266d97384929217f655f"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"be2db36c0ee5690843776f54f893cf5defa8d2b3","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                status)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _process_router_add(self, ri):"},{"line_number":216,"context_line":"        \"\"\"On router add, get fw with rules from plugin and update driver.\"\"\""},{"line_number":217,"context_line":"        LOG.debug(_(\"Process router add, router_id: \u0027%s\u0027\"), ri.router[\u0027id\u0027])"},{"line_number":218,"context_line":"        routers \u003d []"},{"line_number":219,"context_line":"        routers.append(ri.router)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_324e5a97","line":216,"in_reply_to":"fa98f980_9ab4bff3","updated":"2014-09-02 06:01:38.000000000","message":"Thanks Sumit, i am a bit unsure on how the plugin side will deal with this and with the new CREATED flag - introduce - am not sure if this a concern. I will raise this question with the DVR team so we are in sync.","commit_id":"96caeea9e69792727197266d97384929217f655f"}],"neutron/services/firewall/drivers/linux/iptables_fwaas.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b66043b83df3f2477028891c245d5cdc7007ac01","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        fwid \u003d firewall[\u0027id\u0027]"},{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            for router_info in apply_list:"},{"line_number":68,"context_line":"                if agent_mode \u003d\u003d \u0027legacy\u0027:"},{"line_number":69,"context_line":"                    ipt_mgr \u003d router_info.iptables_manager"},{"line_number":70,"context_line":"                elif agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":71,"context_line":"                    ipt_mgr \u003d router_info.snat_iptables_manager"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_996a3e19","line":68,"updated":"2014-08-12 16:21:42.000000000","message":"The \"dvr_snat\" node will also host the \"legacy\" routers.\n\"legacy\" nodes can only host \"centralized routers\". Same as the network node. But \"dvr_snat\" nodes can host both the legacy routers and the distributed routers.","commit_id":"6173639b9de53cce8f7f4fab321b09527d0845c2"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"68648333c57c4e5668e4172b4d173849d6102164","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        fwid \u003d firewall[\u0027id\u0027]"},{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            for router_info in apply_list:"},{"line_number":68,"context_line":"                if agent_mode \u003d\u003d \u0027legacy\u0027:"},{"line_number":69,"context_line":"                    ipt_mgr \u003d router_info.iptables_manager"},{"line_number":70,"context_line":"                elif agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":71,"context_line":"                    ipt_mgr \u003d router_info.snat_iptables_manager"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_be8b6121","line":68,"in_reply_to":"baada198_996a3e19","updated":"2014-08-12 18:50:25.000000000","message":"Thanks Swami. Will need more discussion on this - in the testing i did used this to differentiate the centralized vs distributed. Need to understand more on the \"legacy\" router on the dvr_snat NS.","commit_id":"6173639b9de53cce8f7f4fab321b09527d0845c2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4d83bd95a6ab9425b6c51947091dfd9521197b2f","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                if agent_mode \u003d\u003d \u0027legacy\u0027:"},{"line_number":69,"context_line":"                    ipt_mgr \u003d router_info.iptables_manager"},{"line_number":70,"context_line":"                elif agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":71,"context_line":"                    ipt_mgr \u003d router_info.snat_iptables_manager"},{"line_number":72,"context_line":"                self._remove_chains(fwid, ipt_mgr)"},{"line_number":73,"context_line":"                self._remove_default_chains(ipt_mgr)"},{"line_number":74,"context_line":"                # apply the changes immediately (no defer in firewall path)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ae9996d1","line":71,"updated":"2014-08-12 02:00:55.000000000","message":"Since you\u0027re doing this in three different places it might be better to use a helper function.","commit_id":"6173639b9de53cce8f7f4fab321b09527d0845c2"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"68648333c57c4e5668e4172b4d173849d6102164","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                if agent_mode \u003d\u003d \u0027legacy\u0027:"},{"line_number":69,"context_line":"                    ipt_mgr \u003d router_info.iptables_manager"},{"line_number":70,"context_line":"                elif agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":71,"context_line":"                    ipt_mgr \u003d router_info.snat_iptables_manager"},{"line_number":72,"context_line":"                self._remove_chains(fwid, ipt_mgr)"},{"line_number":73,"context_line":"                self._remove_default_chains(ipt_mgr)"},{"line_number":74,"context_line":"                # apply the changes immediately (no defer in firewall path)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7e0e29e6","line":71,"in_reply_to":"baada198_ae9996d1","updated":"2014-08-12 18:50:25.000000000","message":"Thanks Brian, will keep this in mind as the patch evolves with more discussion with the DVR team.","commit_id":"6173639b9de53cce8f7f4fab321b09527d0845c2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"08fb589d0544163d982a56fa038d525dd453ada0","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_ipt_mgr(self, agent_mode, router_info):"},{"line_number":63,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":64,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":65,"context_line":"                return router_info.snat_iptables_manager"},{"line_number":66,"context_line":"            elif agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":67,"context_line":"                return router_info.iptables_manager"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_61447874","line":64,"updated":"2014-08-26 20:24:40.000000000","message":"I would just put these two lines together:\n\nif router_info.router[\u0027distributed\u0027] and agent_mode \u003d\u003d \u0027dvr_snat\u0027:\n    return router_info.snat_iptables_manage\nelse:\n    return router_info.iptables_manager\n\nThat way this can\u0027t possibly return None if agent_mode isn\u0027t one of the two values here.","commit_id":"71b2b10338d535bd7adae79eabde68c4441546c8"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"778cd3d31c4e79eeca658574635df31eae40e0e4","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_ipt_mgr(self, agent_mode, router_info):"},{"line_number":63,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":64,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":65,"context_line":"                return router_info.snat_iptables_manager"},{"line_number":66,"context_line":"            elif agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":67,"context_line":"                return router_info.iptables_manager"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_b2908a4f","line":64,"in_reply_to":"1abeadc6_61447874","updated":"2014-09-02 06:01:27.000000000","message":"Thanks Brian. I have not ignored ur comment - I have been in discussion with the DVR team and have tried to address the various combinations possible  so we don\u0027t miss out on any corner cases. Hence i did not address this earlier and was waiting for the dust to settle. This method has changed a bit and i will be more than happy to address any suggestions u my have in the latest patch.","commit_id":"71b2b10338d535bd7adae79eabde68c4441546c8"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"86ac0c2147bd37c28f894c0a26ad4c472b83d2c3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":64,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":65,"context_line":"                return router_info.snat_iptables_manager"},{"line_number":66,"context_line":"                # there is a case where we can also have an IR namespace"},{"line_number":67,"context_line":"                # need to test that"},{"line_number":68,"context_line":"            elif agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":69,"context_line":"                return router_info.iptables_manager"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_daf807c7","line":66,"updated":"2014-09-01 05:55:53.000000000","message":"IR -\u003e qr-*","commit_id":"96caeea9e69792727197266d97384929217f655f"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"be2db36c0ee5690843776f54f893cf5defa8d2b3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":64,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":65,"context_line":"                return router_info.snat_iptables_manager"},{"line_number":66,"context_line":"                # there is a case where we can also have an IR namespace"},{"line_number":67,"context_line":"                # need to test that"},{"line_number":68,"context_line":"            elif agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":69,"context_line":"                return router_info.iptables_manager"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_0d83f756","line":66,"in_reply_to":"fa98f980_daf807c7","updated":"2014-09-02 06:01:38.000000000","message":"That specific line is gone now - but as in prev comment - will clarify with dvr team on naming and change accordingly.","commit_id":"96caeea9e69792727197266d97384929217f655f"},{"author":{"_account_id":7576,"name":"Gary Duan","email":"garyduan@gmail.com","username":"garyduan"},"change_message_id":"f8de36e9a169dc7e28dde81ed569e9e66066359a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            LOG.exception(_(\"Failed to create firewall: %s\"), firewall[\u0027id\u0027])"},{"line_number":60,"context_line":"            raise fw_ext.FirewallInternalDriverError(driver\u003dFWAAS_DRIVER_NAME)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_ipt_mgrs_with_if_prefix(self, agent_mode, router_info):"},{"line_number":63,"context_line":"        ipt_mgrs \u003d []"},{"line_number":64,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_7cc6b09b","line":62,"updated":"2014-09-03 15:40:57.000000000","message":"Second this. Add doc string to explain the different locations where rules are applied.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"aa26439f217ca8fbd8e21d83e9616f07d273064a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            LOG.exception(_(\"Failed to create firewall: %s\"), firewall[\u0027id\u0027])"},{"line_number":60,"context_line":"            raise fw_ext.FirewallInternalDriverError(driver\u003dFWAAS_DRIVER_NAME)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_ipt_mgrs_with_if_prefix(self, agent_mode, router_info):"},{"line_number":63,"context_line":"        ipt_mgrs \u003d []"},{"line_number":64,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_a565781f","line":62,"updated":"2014-09-02 23:49:11.000000000","message":"nit: Add some doc string to this function.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"86575660194eb1a6235d8458c4c13098acf83daa","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            LOG.exception(_(\"Failed to create firewall: %s\"), firewall[\u0027id\u0027])"},{"line_number":60,"context_line":"            raise fw_ext.FirewallInternalDriverError(driver\u003dFWAAS_DRIVER_NAME)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_ipt_mgrs_with_if_prefix(self, agent_mode, router_info):"},{"line_number":63,"context_line":"        ipt_mgrs \u003d []"},{"line_number":64,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_085d2d79","line":62,"in_reply_to":"fa98f980_7cc6b09b","updated":"2014-09-04 20:26:35.000000000","message":"Thanks Swami \u0026 Gary - have added.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"2849daee8c3db0eb1f80ba4a6ad5c152ca1ad7e8","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        ipt_mgrs \u003d []"},{"line_number":64,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_715efd13","line":66,"updated":"2014-09-02 20:01:40.000000000","message":"nit: consider using the following format:\n\n# TODO(sridar):","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"86575660194eb1a6235d8458c4c13098acf83daa","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        ipt_mgrs \u003d []"},{"line_number":64,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_28575159","line":66,"in_reply_to":"fa98f980_715efd13","updated":"2014-09-04 20:26:35.000000000","message":"Thanks Ivar - done.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"5177df598e3a2f1a038be0455deb894fd0548076","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":70,"context_line":"                ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":71,"context_line":"                ipt_mgrs.append(ipt_if_prefix.copy())"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_7eebfa77","line":68,"updated":"2014-09-03 21:41:41.000000000","message":"To be certain the snat is hosted on this agent, add check for host also . Please adapt the following code to suit your need:\n              if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and (\n                ex_gw_port[\u0027binding:host_id\u0027] \u003d\u003d self.host):","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"190a8eddd9379102c5dc6fca725fcf26f21d2c84","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":70,"context_line":"                ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":71,"context_line":"                ipt_mgrs.append(ipt_if_prefix.copy())"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_6ca8ad77","line":68,"in_reply_to":"fa98f980_0aec64f2","updated":"2014-09-04 00:21:22.000000000","message":"please go with router_info.router[\u0027gw_port_host\u0027] as Michael Smith suggested \nand your check can be \nif router_info.router.get(\u0027gw_port\u0027) and router_info.router[\u0027gw_port_host\u0027]  \u003d\u003d self.host:\n\nNote: This is assuming you are not using the function when the gateway is being deleted.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"86575660194eb1a6235d8458c4c13098acf83daa","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":70,"context_line":"                ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":71,"context_line":"                ipt_mgrs.append(ipt_if_prefix.copy())"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_a898a11c","line":68,"in_reply_to":"fa98f980_6ca8ad77","updated":"2014-09-04 20:26:35.000000000","message":"Thanks Rajeev but this did not quite work. \n\nNow given that the issue here is related to an existing issue for which u have a patch in review:\nhttps://review.openstack.org/#/c/112146/\n\ni am for now doing a pass on the AttributeError when i access it. Once ur patch merges - can do a simpler check.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"5151cd753455ee62070c3d504b72f7ac4381088a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":70,"context_line":"                ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":71,"context_line":"                ipt_mgrs.append(ipt_if_prefix.copy())"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_d97a4023","line":68,"in_reply_to":"fa98f980_7eebfa77","updated":"2014-09-03 21:49:59.000000000","message":"Thanks Rajeev based on our earlier discussion - this should cover the issue we see ? \n\nAt this point i would like to minimize the code change - is this cached into router_info ? This i will have access to in the driver for sure.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"457db754393467ec41172bf1db6f570788401c05","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":70,"context_line":"                ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":71,"context_line":"                ipt_mgrs.append(ipt_if_prefix.copy())"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_8af694f7","line":68,"in_reply_to":"fa98f980_7eebfa77","updated":"2014-09-03 23:21:30.000000000","message":"do you mean router_info.router[\u0027gw_port_host\u0027] ?","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"c6c0c794607369addceb6d45c65a57257bea691f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":66,"context_line":"            #todo sridar: clean up on strings - need to pick up from"},{"line_number":67,"context_line":"            # dvr constants"},{"line_number":68,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":69,"context_line":"                ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":70,"context_line":"                ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":71,"context_line":"                ipt_mgrs.append(ipt_if_prefix.copy())"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_0aec64f2","line":68,"in_reply_to":"fa98f980_8af694f7","updated":"2014-09-03 23:32:22.000000000","message":"This is what i see in this situation among the things we have discussed.\n\n(Pdb) p router_info.ex_gw_port\nNone\n\n(Pdb) p router_info.router[\u0027gw_port_host\u0027]\nu\u0027myhost-2\u0027\n\n(Pdb) p router_info.snat_iptables_manager\n*** AttributeError: AttributeError(\"\u0027RouterInfo\u0027 object has no attribute \u0027snat_iptables_manager\u0027\",)\n\nAs discussed, any one thing that guarantees that the snat namespace is set would do the trick.\n\nRather can i conclude by checking if router_info.ex_gw_port is None ?","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"2849daee8c3db0eb1f80ba4a6ad5c152ca1ad7e8","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.iptables_manager"},{"line_number":79,"context_line":"            ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027qr-+\u0027"},{"line_number":80,"context_line":"            ipt_mgrs.append(ipt_if_prefix.copy())"},{"line_number":81,"context_line":"            return ipt_mgrs"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def delete_firewall(self, agent_mode, apply_list, firewall):"},{"line_number":84,"context_line":"        LOG.debug(_(\u0027Deleting firewall %(fw_id)s for tenant %(tid)s)\u0027),"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_313d55bc","line":81,"updated":"2014-09-02 20:01:40.000000000","message":"nit: this line can be indented outside the else statement, and L76 can be removed","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"86575660194eb1a6235d8458c4c13098acf83daa","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.iptables_manager"},{"line_number":79,"context_line":"            ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027qr-+\u0027"},{"line_number":80,"context_line":"            ipt_mgrs.append(ipt_if_prefix.copy())"},{"line_number":81,"context_line":"            return ipt_mgrs"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def delete_firewall(self, agent_mode, apply_list, firewall):"},{"line_number":84,"context_line":"        LOG.debug(_(\u0027Deleting firewall %(fw_id)s for tenant %(tid)s)\u0027),"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_e89e2906","line":81,"in_reply_to":"fa98f980_313d55bc","updated":"2014-09-04 20:26:35.000000000","message":"Done","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c43f5f1f7c18131b68ee6727f5327b87c945fb1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\"Gets the iptables manager along with the if prefix to apply rules."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        With DVR we can have differing namespaces depending on which agent"},{"line_number":66,"context_line":"        (on Network or Compute node). And there is an associated i/f for"},{"line_number":67,"context_line":"        each namespace. The iptables on relevant namespace and matching"},{"line_number":68,"context_line":"        i/f are provided. On the Network node we could have both the snat"},{"line_number":69,"context_line":"        namespace and a fip so this is provided back as a list - so in that"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_32c6a517","line":66,"updated":"2014-09-07 17:30:41.000000000","message":"if these two sentences are connected with an and, there shouldn\u0027t be a full stop between the two.","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"22620efbe1eade4ce127fbd5dbe4116967e42047","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\"Gets the iptables manager along with the if prefix to apply rules."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        With DVR we can have differing namespaces depending on which agent"},{"line_number":66,"context_line":"        (on Network or Compute node). And there is an associated i/f for"},{"line_number":67,"context_line":"        each namespace. The iptables on relevant namespace and matching"},{"line_number":68,"context_line":"        i/f are provided. On the Network node we could have both the snat"},{"line_number":69,"context_line":"        namespace and a fip so this is provided back as a list - so in that"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_03d138cd","line":66,"in_reply_to":"fa98f980_32c6a517","updated":"2014-09-08 16:32:29.000000000","message":"Thanks Armando. Fixed this.","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"15aa210c259cb14ab591a672a81b2acef42aacce","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        scenario rules can be applied on both."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            #TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_ef8e282d","line":73,"updated":"2014-09-05 01:09:23.000000000","message":"Sridhar - Just a clarification.\nDid we not ask you to check for the host before applying the snat_iptables rule in the snat namespace.\n\"gw_port_host\"","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"efb842429629857eb4b7054a981d9d72ef9934b9","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        scenario rules can be applied on both."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            #TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_27711e0c","line":73,"in_reply_to":"fa98f980_27acc18b","updated":"2014-09-05 17:42:21.000000000","message":"I am ok with this.","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"2b5ed74697e1a5043b06a085035dd929e4c66b84","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        scenario rules can be applied on both."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            #TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_27acc18b","line":73,"in_reply_to":"fa98f980_be8b701d","updated":"2014-09-05 15:50:55.000000000","message":"Swami - by virtue of checking for the agent mode and\nthen the presence of the snat namespace, we are good on this?","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"3de6b29a1603efcc67ddd7564a19d569700bcd82","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        scenario rules can be applied on both."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            #TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_be8b701d","line":73,"in_reply_to":"fa98f980_ef8e282d","updated":"2014-09-05 05:34:18.000000000","message":"Thanks Swami for taking a look. Yes i tried that but it seems that this is set even before the snat iptables is initialized. Pasting my email response  below:\n\nPls see that gw_port_host is set now but there is no snat_iptables_manager in router_info\n------------------------------------------------------------------------------------------\n\n(Pdb) dir (router_info)\n[\u0027__class__\u0027, \u0027__delattr__\u0027, \u0027__dict__\u0027, \u0027__doc__\u0027, \u0027__format__\u0027, \u0027__getattribute__\u0027, \u0027__hash__\u0027, \u0027__init__\u0027, \u0027__module__\u0027, \u0027__new__\u0027, \u0027__reduce__\u0027, \u0027__reduce_ex__\u0027, \u0027__repr__\u0027, \u0027__setattr__\u0027, \u0027__sizeof__\u0027, \u0027__str__\u0027, \u0027__subclasshook__\u0027, \u0027__weakref__\u0027, \u0027_router\u0027, \u0027_snat_action\u0027, \u0027_snat_enabled\u0027, \u0027dist_fip_count\u0027, \u0027ex_gw_port\u0027, \u0027floating_ips\u0027, \u0027floating_ips_dict\u0027, \u0027internal_ports\u0027, \u0027iptables_manager\u0027, \u0027ns_name\u0027, \u0027perform_snat_action\u0027, \u0027root_helper\u0027, \u0027router\u0027, \u0027router_id\u0027, \u0027routes\u0027, \u0027rtr_fip_subnet\u0027, \u0027snat_ports\u0027, \u0027use_namespaces\u0027]\n(Pdb)\n\n\n(Pdb) p router_info.router\n{u\u0027status\u0027: u\u0027ACTIVE\u0027, u\u0027external_gateway_info\u0027: {u\u0027network_id\u0027: u\u002780720f18-ea8e-4a15-bae9-c2e92bdb1812\u0027, u\u0027enable_snat\u0027: True}, u\u0027enable_snat\u0027: True, u\u0027gw_port_host\u0027: u\u0027skandasw-2\u0027, u\u0027gw_port_id\u0027: u\u0027a31ba1db-eed7-4c68-842c-6d7aba898809\u0027, u\u0027admin_state_up\u0027: True, u\u0027tenant_id\u0027: u\u0027cd2757191e8b486d9f4af75dcfda1428\u0027, u\u0027gw_port\u0027: {u\u0027status\u0027: u\u0027DOWN\u0027, u\u0027subnet\u0027: {u\u0027ipv6_ra_mode\u0027: None, u\u0027cidr\u0027: u\u0027172.24.4.0/24\u0027, u\u0027gateway_ip\u0027: u\u0027172.24.4.1\u0027, u\u0027id\u0027: u\u00276f7c43d3-0fc9-4ce6-8e7a-fc78ef950798\u0027}, u\u0027binding:host_id\u0027: u\u0027\u0027, u\u0027name\u0027: u\u0027\u0027, u\u0027allowed_address_pairs\u0027: [], u\u0027admin_state_up\u0027: True, u\u0027network_id\u0027: u\u002780720f18-ea8e-4a15-bae9-c2e92bdb1812\u0027, u\u0027tenant_id\u0027: u\u0027\u0027, u\u0027extra_dhcp_opts\u0027: [], u\u0027binding:vif_details\u0027: {}, u\u0027binding:vif_type\u0027: u\u0027unbound\u0027, u\u0027device_owner\u0027: u\u0027network:router_gateway\u0027, u\u0027mac_address\u0027: u\u0027fa:16:3e:ac:40:2f\u0027, u\u0027extra_subnets\u0027: [], u\u0027binding:profile\u0027: {}, u\u0027binding:vnic_type\u0027: u\u0027normal\u0027, u\u0027fixed_ips\u0027: [{u\u0027subnet_id\u0027: u\u00276f7c43d3-0fc9-4ce6-8e7a-fc78ef950798\u0027, u\u0027ip_address\u0027: u\u0027172.24.4.5\u0027}], u\u0027id\u0027: u\u0027a31ba1db-eed7-4c68-842c-6d7aba898809\u0027, u\u0027security_groups\u0027: [], u\u0027device_id\u0027: u\u00278af95201-c80a-4c88-bc18-b0d6727b6e6c\u0027}, u\u0027distributed\u0027: True, u\u0027_snat_router_interfaces\u0027: [], u\u0027routes\u0027: [], u\u0027id\u0027: u\u00278af95201-c80a-4c88-bc18-b0d6727b6e6c\u0027, u\u0027name\u0027: u\u0027router4\u0027}\n(Pdb)","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c43f5f1f7c18131b68ee6727f5327b87c945fb1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            #TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_52cb291e","line":75,"updated":"2014-09-07 17:30:41.000000000","message":"space after # is customary","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"22620efbe1eade4ce127fbd5dbe4116967e42047","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            #TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_43da60ea","line":75,"in_reply_to":"fa98f980_52cb291e","updated":"2014-09-08 16:32:29.000000000","message":"Done","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c43f5f1f7c18131b68ee6727f5327b87c945fb1","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":80,"context_line":"                    ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":81,"context_line":"                    ipt_mgrs.append(ipt_if_prefix.copy())"},{"line_number":82,"context_line":"                except AttributeError:"},{"line_number":83,"context_line":"                    pass"},{"line_number":84,"context_line":"            if router_info.dist_fip_count:"},{"line_number":85,"context_line":"                # handle the fip case on n/w or compute node."}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b2529566","line":82,"updated":"2014-09-07 17:30:41.000000000","message":"I understand that this is done to deal with bug #1353006, but this is being addressed here: https://review.openstack.org/#/c/112146/\n\nWouldn\u0027t it be better seconding the error for now, or adding a FIXME note? This try-catch is unnecessary once the patch merges.","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"22620efbe1eade4ce127fbd5dbe4116967e42047","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":80,"context_line":"                    ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":81,"context_line":"                    ipt_mgrs.append(ipt_if_prefix.copy())"},{"line_number":82,"context_line":"                except AttributeError:"},{"line_number":83,"context_line":"                    pass"},{"line_number":84,"context_line":"            if router_info.dist_fip_count:"},{"line_number":85,"context_line":"                # handle the fip case on n/w or compute node."}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_2372bce5","line":82,"in_reply_to":"fa98f980_b2529566","updated":"2014-09-08 16:32:29.000000000","message":"I was also unsure and thought would ensure that taking this approach and come for now and remove it later. But if it is fine to second the error - that works and i have removed the try - except.","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"1c43f5f1f7c18131b68ee6727f5327b87c945fb1","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                           (IPV6, ipt_mgr.ipv6[\u0027filter\u0027])]:"},{"line_number":255,"context_line":"            for direction in [INGRESS_DIRECTION, EGRESS_DIRECTION]:"},{"line_number":256,"context_line":"                chain_name \u003d self._get_chain_name(fwid, ver, direction)"},{"line_number":257,"context_line":"                # todo sridar: check this"},{"line_number":258,"context_line":"                chain_name \u003d iptables_manager.get_chain_name(chain_name)"},{"line_number":259,"context_line":"                if chain_name in tbl.chains:"},{"line_number":260,"context_line":"                    jump_rule \u003d [\u0027%s %s -j %s-%s\u0027 % (IPTABLES_DIR[direction],"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b2d9b5f6","line":257,"updated":"2014-09-07 17:30:41.000000000","message":"could you elaborate on this todo, please?","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"22620efbe1eade4ce127fbd5dbe4116967e42047","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                           (IPV6, ipt_mgr.ipv6[\u0027filter\u0027])]:"},{"line_number":255,"context_line":"            for direction in [INGRESS_DIRECTION, EGRESS_DIRECTION]:"},{"line_number":256,"context_line":"                chain_name \u003d self._get_chain_name(fwid, ver, direction)"},{"line_number":257,"context_line":"                # todo sridar: check this"},{"line_number":258,"context_line":"                chain_name \u003d iptables_manager.get_chain_name(chain_name)"},{"line_number":259,"context_line":"                if chain_name in tbl.chains:"},{"line_number":260,"context_line":"                    jump_rule \u003d [\u0027%s %s -j %s-%s\u0027 % (IPTABLES_DIR[direction],"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_a354ec21","line":257,"in_reply_to":"fa98f980_b2d9b5f6","updated":"2014-09-08 16:32:29.000000000","message":"Sorry this was something i added for myself when i was testing and forgot to remove this, Removed now.","commit_id":"6672e5d233fdbf120db458f683853f16c8000dad"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a516db2298ef1aaeb68e3a8b8a8cf98d69444da2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        scenario rules can be applied on both."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_1fe265d5","line":73,"updated":"2014-09-08 21:25:26.000000000","message":"Creating this dict here and then calling copy below to add them to ipt_mgrs below isn\u0027t as straight-forward as it could be.  Just create the dict below:\n\n  ipt_if_prefix \u003d {\u0027ipt\u0027: ..., \u0027if_prefix\u0027: ... }\n  ipt_mgrs.append(ipt_prefix)\n\nYou would now have the option of inlining this.  The temporary variable \u0027ipt_if_prefix\u0027 doesn\u0027t do much for me.\n\n  ipt_mgrs.append({\u0027ipt\u0027: ..., \u0027if_prefix\u0027: ... }\n\nThe method could look for like this which I think is quite a bit easier to read (includes L74\u0027s comment too).\n\n        if not router_info.router[\u0027distributed\u0027]: \n            return [{\u0027ipt\u0027: router_info.iptables_manager, \u0027if_prefix\u0027: \u0027qr-\u0027}]\n\n        ipt_mgrs \u003d [] \n        if agent_mode \u003d\u003d \u0027dvr_snat\u0027:\n            if router_info.snat_iptables_manager:\n                ipt_mgrs.append({\u0027ipt\u0027: router_info.snat_iptables_manager,\n                                 \u0027if_prefix\u0027: \u0027sg-\u0027})\n        if router_info.dist_fip_count:\n            # handle the fip case on n/w or compute node.\n            ipt_mgrs.append({\u0027ipt\u0027: router_info.iptables_manager,\n                             \u0027if_prefix\u0027: \u0027rfp-\u0027})\n        return ipt_mgrs\n\nThis version has fewer temporaries, no dict copying, and less indentation to slow down readers.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"a99b704f4b3ccc7039a39132cd0d23d189bdd852","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        scenario rules can be applied on both."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_0d579003","line":73,"in_reply_to":"fa98f980_1fe265d5","updated":"2014-09-09 07:23:22.000000000","message":"Thanks Carl - this definitely looks more cleaner and readable. Have taken care of this.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a516db2298ef1aaeb68e3a8b8a8cf98d69444da2","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_5f114dab","line":74,"updated":"2014-09-08 21:25:26.000000000","message":"Suggestion:  Reverse the sense of this if statement, pull L88 - L91 up here and return.  Then, reduce the indentation level of the rest of the method.  You could also move the definition of ipt_mgrs down too past the non-distributed code.\n\nThat puts the simple case first and makes it clear that most of the complication in this method is due to the distributed case.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"a99b704f4b3ccc7039a39132cd0d23d189bdd852","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_ad47644a","line":74,"in_reply_to":"fa98f980_5f114dab","updated":"2014-09-09 07:23:22.000000000","message":"Have incorporated this. Thanks.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a516db2298ef1aaeb68e3a8b8a8cf98d69444da2","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_5fd6adc6","line":75,"updated":"2014-09-08 21:25:26.000000000","message":"nit:  This seems like a pretty important thing to leave as a TODO.  Could this be cleaned up trivially?  These are defined in l3_agent.py so it may not be trivial to refer to them here without a refactor that may be considered out of the scope of this patch.  You might consider a follow-on or even a dependent patch with the refactoring you need to do this.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"5f81ff9e3a5eea296980e280cfdb9d5edd82f1f1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_eadce476","line":75,"in_reply_to":"fa98f980_0df3100b","updated":"2014-09-09 14:33:40.000000000","message":"I\u0027m okay with what you suggest. Please post the patch asap as a follow on.  At least as a WIP and placeholder.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"a99b704f4b3ccc7039a39132cd0d23d189bdd852","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_0df3100b","line":75,"in_reply_to":"fa98f980_5fd6adc6","updated":"2014-09-09 07:23:22.000000000","message":"I did look at the best way of tackling this - and yes - i did look at the definitions in l3_agent.py and the best way would have been to maintain this in an appropriate constants file and import - did not want to embark on that at this point. But will address this refactor in a separate patch.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"bac941bd90950f44982b81aa5491c14bfba9377e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        ipt_mgrs \u003d []"},{"line_number":73,"context_line":"        ipt_if_prefix \u003d dict()"},{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_854d0975","line":75,"in_reply_to":"fa98f980_eadce476","updated":"2014-09-09 14:57:31.000000000","message":"Thanks Carl. Will do so in the next couple of days.\n\nAnd thanks again for the review.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a516db2298ef1aaeb68e3a8b8a8cf98d69444da2","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"},{"line_number":79,"context_line":"                    ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":80,"context_line":"                    ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_a264dce5","line":77,"updated":"2014-09-08 21:25:26.000000000","message":"(no action requested) I think I\u0027d like to see these agent \u003d\u003d \u0027dvr_snat\u0027 type checks to be refactored.  Out of the scope of this patch though.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"a99b704f4b3ccc7039a39132cd0d23d189bdd852","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        if router_info.router[\u0027distributed\u0027]:"},{"line_number":75,"context_line":"            # TODO(sridar): clean up on strings - need to pick up from"},{"line_number":76,"context_line":"            # dvr constants"},{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"},{"line_number":79,"context_line":"                    ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":80,"context_line":"                    ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_ed624cac","line":77,"in_reply_to":"fa98f980_a264dce5","updated":"2014-09-09 07:23:22.000000000","message":"Agreed. I can handle this as i refactor for the interface prefixes.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a516db2298ef1aaeb68e3a8b8a8cf98d69444da2","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"},{"line_number":79,"context_line":"                    ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":80,"context_line":"                    ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":81,"context_line":"                    ipt_mgrs.append(ipt_if_prefix.copy())"},{"line_number":82,"context_line":"            if router_info.dist_fip_count:"},{"line_number":83,"context_line":"                # handle the fip case on n/w or compute node."}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_dfe37d31","line":80,"updated":"2014-09-08 21:25:26.000000000","message":"The \u0027+\u0027 character isn\u0027t really part of the prefix.  I\u0027d prefer that it be moved as an implementation detail into _enable_policy_chain in the various jump_rule strings and remove the \u0027+\u0027 characters from here.  This may help with using constants that you have a TODO for.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"a99b704f4b3ccc7039a39132cd0d23d189bdd852","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            if agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":78,"context_line":"                if router_info.snat_iptables_manager:"},{"line_number":79,"context_line":"                    ipt_if_prefix[\u0027ipt\u0027] \u003d router_info.snat_iptables_manager"},{"line_number":80,"context_line":"                    ipt_if_prefix[\u0027if_prefix\u0027] \u003d \u0027sg-+\u0027"},{"line_number":81,"context_line":"                    ipt_mgrs.append(ipt_if_prefix.copy())"},{"line_number":82,"context_line":"            if router_info.dist_fip_count:"},{"line_number":83,"context_line":"                # handle the fip case on n/w or compute node."}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_2d2b7431","line":80,"in_reply_to":"fa98f980_dfe37d31","updated":"2014-09-09 07:23:22.000000000","message":"Have taken care of this. Since the current code is constructing the command with literals - added that there.","commit_id":"ffe70eb67f7a3e837f2874e7cb80367268226eb0"}],"neutron/tests/unit/services/firewall/agents/l3reference/test_firewall_l3_agent.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"aa26439f217ca8fbd8e21d83e9616f07d273064a","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                               \u0027admin_state_up\u0027: True}]"},{"line_number":250,"context_line":"        fake_router \u003d {\u0027id\u0027: 1111, \u0027tenant_id\u0027: 2}"},{"line_number":251,"context_line":"        self.api.plugin_rpc \u003d mock.Mock()"},{"line_number":252,"context_line":"        agent_mode \u003d \u0027legacy\u0027"},{"line_number":253,"context_line":"        ri \u003d mock.Mock()"},{"line_number":254,"context_line":"        ri.router \u003d fake_router"},{"line_number":255,"context_line":"        routers \u003d [ri.router]"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_2874ff66","line":252,"updated":"2014-09-02 23:49:11.000000000","message":"Is there a separate test case to process the router add on \"dvr_snat\" and \"dvr\" node.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"},{"author":{"_account_id":6995,"name":"Sridar Kandaswamy","email":"skandasw@yahoo.com","username":"skandasw"},"change_message_id":"5151cd753455ee62070c3d504b72f7ac4381088a","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                               \u0027admin_state_up\u0027: True}]"},{"line_number":250,"context_line":"        fake_router \u003d {\u0027id\u0027: 1111, \u0027tenant_id\u0027: 2}"},{"line_number":251,"context_line":"        self.api.plugin_rpc \u003d mock.Mock()"},{"line_number":252,"context_line":"        agent_mode \u003d \u0027legacy\u0027"},{"line_number":253,"context_line":"        ri \u003d mock.Mock()"},{"line_number":254,"context_line":"        ri.router \u003d fake_router"},{"line_number":255,"context_line":"        routers \u003d [ri.router]"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_1702f66e","line":252,"in_reply_to":"fa98f980_2874ff66","updated":"2014-09-03 21:49:59.000000000","message":"Thanks Swami for taking a look. The process_router_add calls out to the driver api - and the different cases result in different code paths in the driver and the UT for that covers that.","commit_id":"835c181af7504ea5643ace59a6674c2f81b04ea6"}]}
