)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9bb6b16f056140d4f73b3f47a02d8a09bf4fea0a","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-01-24 18:16:42 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor management of namespaces in the L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Creates classes representing the 3 types of namespaces handled by the L3 agent:"},{"line_number":10,"context_line":"router, snat and fip."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a930d6b_d9c25433","line":8,"updated":"2015-01-25 23:54:04.000000000","message":"It\u0027s pretty clear to me that the namespace class should be held as a member of the router class. At this point the agent would still invoke methods on the router\u0027s namespace instance, and later on when the routers know how to create/destroy themselves they\u0027d take care of namespace creation/deletion as well. Is there a follow up planned here?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"498f4df6d44c42a738c9c2d6229d64d2af6c02ee","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-01-24 18:16:42 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor management of namespaces in the L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Creates classes representing the 3 types of namespaces handled by the L3 agent:"},{"line_number":10,"context_line":"router, snat and fip."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a930d6b_d2991d7a","line":8,"in_reply_to":"1a930d6b_ae399cf3","updated":"2015-01-27 03:13:15.000000000","message":"Miguel, could you please define the scope of this patch, and any further planned work? It\u0027s very difficult to review as it is.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-01-24 18:16:42 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor management of namespaces in the L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Creates classes representing the 3 types of namespaces handled by the L3 agent:"},{"line_number":10,"context_line":"router, snat and fip."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a930d6b_ae399cf3","line":8,"in_reply_to":"1a930d6b_d9c25433","updated":"2015-01-26 20:01:11.000000000","message":"Yes, there will be follow-up.  First, this is a WIP patch and may evolve to address this.  If we decide to draw the line and merge this patch then a follow-up will address it.\n\nIt is difficult to tease the logic apart and may take a little more work.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":2,"context_line":"Author:     Miguel Lavalle \u003cmiguel@mlavalle.com\u003e"},{"line_number":3,"context_line":"AuthorDate: 2015-01-15 22:16:01 -0600"},{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl.baldwin@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-12 19:46:41 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor management of namespaces in the L3 Agent"},{"line_number":8,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"da86d52c_c8caeb19","line":5,"updated":"2015-02-13 22:49:35.000000000","message":"Should all of the new namespace files be moved into a subdirectory in the l3 folder? Just a thought.","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2015-01-15 22:16:01 -0600"},{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl.baldwin@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-12 19:46:41 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor management of namespaces in the L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Creates classes representing the 3 types of namespaces handled by the L3 agent:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"da86d52c_68f01f92","line":6,"updated":"2015-02-13 22:49:35.000000000","message":"Is this patch deprecating the use_namespaces option? It\u0027s marked as such by comments in several places, but you don\u0027t actually deprecate the option?","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4e8a95e7d211ac95ba4253853da80362cffd8755","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2015-01-15 22:16:01 -0600"},{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl.baldwin@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-12 19:46:41 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor management of namespaces in the L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Creates classes representing the 3 types of namespaces handled by the L3 agent:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"da86d52c_cec82eab","line":6,"in_reply_to":"da86d52c_68f01f92","updated":"2015-02-17 16:25:17.000000000","message":"I don\u0027t think so.  The use_namespaces option should still be in effect.","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8aeb79ab6f53e1e8857be89046465fc696faf8a3","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2015-01-15 22:16:01 -0600"},{"line_number":4,"context_line":"Commit:     Carl Baldwin \u003ccarl.baldwin@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-12 19:46:41 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor management of namespaces in the L3 Agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Creates classes representing the 3 types of namespaces handled by the L3 agent:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"da86d52c_1132075e","line":6,"in_reply_to":"da86d52c_cec82eab","updated":"2015-02-18 00:14:36.000000000","message":"Indeed, the intent of this change is not deprecate the use_namespaces option","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"}],"neutron/agent/l3/agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":64,"context_line":"NS_PREFIX \u003d \u0027qrouter-\u0027"},{"line_number":65,"context_line":"INTERNAL_DEV_PREFIX \u003d \u0027qr-\u0027"},{"line_number":66,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":67,"context_line":"RPC_LOOP_INTERVAL \u003d 1"},{"line_number":68,"context_line":"FLOATING_IP_CIDR_SUFFIX \u003d \u0027/32\u0027"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_be1c4567","side":"PARENT","line":66,"updated":"2015-01-16 18:24:58.000000000","message":"I\u0027m thinking we should probably put these two constants above back and move them in to the router classes in a different patch.  These seem like router constants rather than namespace constants.","commit_id":"6df7f5abf16f11abe784ab33e7885ec7bb8a5273"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":269,"context_line":"            driver \u003d metadata_driver.MetadataDriver.instance(self)"},{"line_number":270,"context_line":"            self.event_observers.add(driver)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        self._rtr_nses \u003d {}"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def _check_config_params(self):"},{"line_number":275,"context_line":"        \"\"\"Check items in configuration files."}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_524fd7bd","line":272,"updated":"2015-01-16 18:24:58.000000000","message":"Eventually, I could see these referenced from the routers themselves instead of directly by the agent.  But, this is a good start.","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        existing_devices \u003d self._get_existing_devices(ri)"},{"line_number":481,"context_line":"        current_internal_devs \u003d set([n for n in existing_devices"},{"line_number":482,"context_line":"                                     if n.startswith("},{"line_number":483,"context_line":"                                         namespaces.INTERNAL_DEV_PREFIX)])"},{"line_number":484,"context_line":"        current_port_devs \u003d set([self.get_internal_device_name(id) for"},{"line_number":485,"context_line":"                                 id in current_port_ids])"},{"line_number":486,"context_line":"        stale_devs \u003d current_internal_devs - current_port_devs"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1859f15a","line":483,"updated":"2015-01-16 18:24:58.000000000","message":"namespaces.INTERNAL_DEV_PREFIX and namespaces.EXTERNAL_DEV_PREFIX don\u0027t make sense to me.  These seem like router constants rather than namespace constants.","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":888,"context_line":"                self._snat_redirect_remove(ri, p, internal_interface)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":891,"context_line":"                self.get_gw_port_host(ri.router) \u003d\u003d self.host):"},{"line_number":892,"context_line":"                ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])"},{"line_number":893,"context_line":"            else:"},{"line_number":894,"context_line":"                # not hosting agent - no work to do"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_18abb11e","line":891,"updated":"2015-01-16 18:24:58.000000000","message":"This would turn in to something like this (also see L906):\n\n  ns \u003d ri.get_snat_ns()\n\nOr just this if we get the encapsulation right.\n\n  ns \u003d ri.get_ns()","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":895,"context_line":"                LOG.debug(\u0027DVR: CSNAT not hosted: %s\u0027, ex_gw_port)"},{"line_number":896,"context_line":"                return"},{"line_number":897,"context_line":"        else:"},{"line_number":898,"context_line":"            ns_name \u003d ri.ns_name"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"        if ri.is_ha:"},{"line_number":901,"context_line":"            self._ha_external_gateway_removed(ri, interface_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_38730d17","line":898,"updated":"2015-01-16 18:24:58.000000000","message":"I see this changing to something along these lines (also see L906)\n\n  ns \u003d ri.get_ns()","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":903,"context_line":"        self.driver.unplug(interface_name,"},{"line_number":904,"context_line":"                           bridge\u003dself.conf.external_network_bridge,"},{"line_number":905,"context_line":"                           namespace\u003dns_name,"},{"line_number":906,"context_line":"                           prefix\u003dnamespaces.EXTERNAL_DEV_PREFIX)"},{"line_number":907,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":908,"context_line":"            self._destroy_snat_namespace(ns_name)"},{"line_number":909,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_72a69355","line":906,"updated":"2015-01-16 18:24:58.000000000","message":"I think what I\u0027d like to work toward is no longer using global constants here but having a namespace instance available from the router.\n\nThis call would become something along these lines:\n\n  self.driver.unplug(interface_name,\n      bridge\u003dself.conf.external_network_bridge,\n      namespace\u003dns.get_name(),\n      prefix\u003dns.get_prefix())","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"bfc71cc8f3665f17ed75e57d5fec705ed6e1ea65","unresolved":false,"context_lines":[{"line_number":903,"context_line":"        self.driver.unplug(interface_name,"},{"line_number":904,"context_line":"                           bridge\u003dself.conf.external_network_bridge,"},{"line_number":905,"context_line":"                           namespace\u003dns_name,"},{"line_number":906,"context_line":"                           prefix\u003dnamespaces.EXTERNAL_DEV_PREFIX)"},{"line_number":907,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":908,"context_line":"            self._destroy_snat_namespace(ns_name)"},{"line_number":909,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_cf67fd4b","line":906,"in_reply_to":"3a961159_72a69355","updated":"2015-01-23 21:10:34.000000000","message":"I\u0027m not even sure my comment here makes sense.  I think that the device prefixes should be constants on the routers, not the namespaces.  I\u0027m not sure what I was thinking before.","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":965,"context_line":"                    self._internal_network_added("},{"line_number":966,"context_line":"                        ns_name, sn_port[\u0027network_id\u0027], sn_port[\u0027id\u0027],"},{"line_number":967,"context_line":"                        sn_port[\u0027ip_cidr\u0027], sn_port[\u0027mac_address\u0027],"},{"line_number":968,"context_line":"                        interface_name, namespaces.SNAT_INT_DEV_PREFIX)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"    def internal_network_removed(self, ri, port):"},{"line_number":971,"context_line":"        port_id \u003d port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b80e1d3b","line":968,"updated":"2015-01-16 18:24:58.000000000","message":"Seems like a dvr router constant here.","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34fdb492cd3a5d59e90b8e84342e1f8aace04eed","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            driver \u003d metadata_driver.MetadataDriver.instance(self)"},{"line_number":206,"context_line":"            self.event_observers.add(driver)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        self._rtr_nses \u003d {}"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def _check_config_params(self):"},{"line_number":211,"context_line":"        \"\"\"Check items in configuration files."}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_375e5813","line":208,"updated":"2015-01-22 13:19:02.000000000","message":"nit: spell out variable for readability.","commit_id":"7196b407f2fa14df9781831643979ee9768a2dbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34fdb492cd3a5d59e90b8e84342e1f8aace04eed","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        ri.ns \u003d namespaces.L3Namespace(ri.ns_name,"},{"line_number":285,"context_line":"                                       self.use_ipv6,"},{"line_number":286,"context_line":"                                       self.root_helper)"},{"line_number":287,"context_line":"        ri.ns.create()"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def _fetch_external_net_id(self, force\u003dFalse):"},{"line_number":290,"context_line":"        \"\"\"Find UUID of single external network for this agent.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_b7488888","line":287,"updated":"2015-01-22 13:19:02.000000000","message":"It seems like all cases of creating a namespace, also call its create() method. Should the create call be done as part of __init__, or is there a case where create() should not be called?","commit_id":"7196b407f2fa14df9781831643979ee9768a2dbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"87b3dca8994048354ba16920f533c58ba2162981","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        ri.ns \u003d namespaces.L3Namespace(ri.ns_name,"},{"line_number":285,"context_line":"                                       self.use_ipv6,"},{"line_number":286,"context_line":"                                       self.root_helper)"},{"line_number":287,"context_line":"        ri.ns.create()"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def _fetch_external_net_id(self, force\u003dFalse):"},{"line_number":290,"context_line":"        \"\"\"Find UUID of single external network for this agent.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_cff0dd00","line":287,"in_reply_to":"1a930d6b_b7488888","updated":"2015-01-23 20:53:19.000000000","message":"No.  This will not be true in general.  We need to be able to construct a namespace object for an existing namespace without create.","commit_id":"7196b407f2fa14df9781831643979ee9768a2dbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c4e5ec3c12caa1b9013badceae055e1d4cbc16d8","unresolved":false,"context_lines":[{"line_number":341,"context_line":"    def _router_added(self, router_id, router):"},{"line_number":342,"context_line":"        ri \u003d self._create_router(router_id, router)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        self.event_observers.notify("},{"line_number":345,"context_line":"            adv_svc.AdvancedService.before_router_added, ri)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        self.router_info[router_id] \u003d ri"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_4f714d75","line":344,"updated":"2015-01-23 20:57:17.000000000","message":"Try to avoid gratuitous changes.","commit_id":"313b5c721cd93bb903d0c0e59a126a1761bd76d7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c4e5ec3c12caa1b9013badceae055e1d4cbc16d8","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        if self.conf.use_namespaces:"},{"line_number":349,"context_line":"            ns \u003d namespaces.RouterNamespace(router_id, self.conf, self.driver,"},{"line_number":350,"context_line":"                                            self.root_helper, self.use_ipv6)"},{"line_number":351,"context_line":"            self._rtr_nses[router_id] \u003d ns"},{"line_number":352,"context_line":"        else:"},{"line_number":353,"context_line":"            ns \u003d namespaces.RootNamespace()"},{"line_number":354,"context_line":"        ns.create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_4ff86dc3","line":351,"updated":"2015-01-23 20:57:17.000000000","message":"Should this move out to before L354.  Then, we don\u0027t have to check self.conf.use_namespaces before we look for the namespace in self._rtr_nses.","commit_id":"313b5c721cd93bb903d0c0e59a126a1761bd76d7"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        if self.conf.enable_metadata_proxy:"},{"line_number":204,"context_line":"            driver \u003d metadata_driver.MetadataDriver.instance(self)"},{"line_number":205,"context_line":"            self.event_observers.add(driver)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        self._rtr_nses \u003d {}"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _check_config_params(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_f9fe30ad","line":206,"updated":"2015-01-25 23:52:19.000000000","message":"Please rename to self._router_namespaces.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"13da06754ea2a8a6eb776e33ac8f185ae73f86d4","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        if self.conf.enable_metadata_proxy:"},{"line_number":204,"context_line":"            driver \u003d metadata_driver.MetadataDriver.instance(self)"},{"line_number":205,"context_line":"            self.event_observers.add(driver)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        self._rtr_nses \u003d {}"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def _check_config_params(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_51e54636","line":206,"in_reply_to":"1a930d6b_f9fe30ad","updated":"2015-01-26 15:27:11.000000000","message":"+1 from my PS3 comments.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                LOG.exception(_LE(\u0027Failed to destroy stale router namespace \u0027"},{"line_number":265,"context_line":"                                  \u0027%s\u0027), ns)"},{"line_number":266,"context_line":"        self._clean_stale_namespaces \u003d False"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def _destroy_namespace(self, ns_name):"},{"line_number":269,"context_line":"        if ns_name.startswith(namespaces.NS_PREFIX):"},{"line_number":270,"context_line":"            self._destroy_router_namespace(ns_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_192f7c40","line":267,"updated":"2015-01-25 23:52:19.000000000","message":"A namespace should be able to delete itself without the agent having the knowledge of how to delete every kind of namespace. Is there a follow up planned? Is there an issue withholding you from removing the agent destroy namespace functions?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                LOG.exception(_LE(\u0027Failed to destroy stale router namespace \u0027"},{"line_number":265,"context_line":"                                  \u0027%s\u0027), ns)"},{"line_number":266,"context_line":"        self._clean_stale_namespaces \u003d False"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def _destroy_namespace(self, ns_name):"},{"line_number":269,"context_line":"        if ns_name.startswith(namespaces.NS_PREFIX):"},{"line_number":270,"context_line":"            self._destroy_router_namespace(ns_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_0ef8f0c1","line":267,"in_reply_to":"1a930d6b_192f7c40","updated":"2015-01-26 20:01:11.000000000","message":"@Assaf  Yes, that is the plan.  It may take a little more work to tease this apart.  The problem now is that the agent is still ultimately driving namespace cleanup.  If not in this patch, a follow-up will address it.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"13da06754ea2a8a6eb776e33ac8f185ae73f86d4","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        ri.ns \u003d namespaces.L3Namespace(ri.ns_name,"},{"line_number":287,"context_line":"                                       self.use_ipv6,"},{"line_number":288,"context_line":"                                       self.root_helper)"},{"line_number":289,"context_line":"        ri.ns.create()"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def _fetch_external_net_id(self, force\u003dFalse):"},{"line_number":292,"context_line":"        \"\"\"Find UUID of single external network for this agent.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_516aa681","line":289,"updated":"2015-01-26 15:27:11.000000000","message":"Since there is the need to be able to create a namespace object, w/o calling create(), but it is common to do those two together (I see it all over), is it worth it to had a (static) helper method that constructs a L3Namespace and calls create()?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            ns \u003d namespaces.RouterNamespace(router_id, self.conf, self.driver,"},{"line_number":353,"context_line":"                                            self.root_helper, self.use_ipv6)"},{"line_number":354,"context_line":"            self._rtr_nses[router_id] \u003d ns"},{"line_number":355,"context_line":"        else:"},{"line_number":356,"context_line":"            ns \u003d namespaces.RootNamespace()"},{"line_number":357,"context_line":"        ns.create()"},{"line_number":358,"context_line":"        self.process_router_add(ri)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_39343892","line":355,"updated":"2015-01-25 23:52:19.000000000","message":"Please get rid of the RootNamespace idea. Just call ns.create in the if block and do nothing in the else case.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            ns \u003d namespaces.RouterNamespace(router_id, self.conf, self.driver,"},{"line_number":353,"context_line":"                                            self.root_helper, self.use_ipv6)"},{"line_number":354,"context_line":"            self._rtr_nses[router_id] \u003d ns"},{"line_number":355,"context_line":"        else:"},{"line_number":356,"context_line":"            ns \u003d namespaces.RootNamespace()"},{"line_number":357,"context_line":"        ns.create()"},{"line_number":358,"context_line":"        self.process_router_add(ri)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_6e8a541c","line":355,"in_reply_to":"1a930d6b_39343892","updated":"2015-01-26 20:01:11.000000000","message":"@Assaf What is your specific issue with RootNamespace as a class?  What you suggest is equivalent for now but without any real justification for why it should change.\n\nI personally think of the root namespace very much like any other namespace.  The differences are these:\n\n 1. Don\u0027t create or delete it\n 2. No special command to enter it.\n\nI\u0027m not sure I agree.  My hope is that the root namespace idea will help avoid other \"if self.conf.use_namespaces:\" logic sprinkled around.  Specifically, when namespace cleanup moves from the agent to the namespace classes and router, it could be cleaner this way.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"498f4df6d44c42a738c9c2d6229d64d2af6c02ee","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            ns \u003d namespaces.RouterNamespace(router_id, self.conf, self.driver,"},{"line_number":353,"context_line":"                                            self.root_helper, self.use_ipv6)"},{"line_number":354,"context_line":"            self._rtr_nses[router_id] \u003d ns"},{"line_number":355,"context_line":"        else:"},{"line_number":356,"context_line":"            ns \u003d namespaces.RootNamespace()"},{"line_number":357,"context_line":"        ns.create()"},{"line_number":358,"context_line":"        self.process_router_add(ri)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_f292994a","line":355,"in_reply_to":"1a930d6b_6e8a541c","updated":"2015-01-27 03:13:15.000000000","message":"I see. As it is there\u0027s only one usage for it (I think? Here) and it seems like an unneeded complication, but if it saves on the endless self.conf.use_namespaces, all the better!\n\nSide note: We should really deprecate that option this cycle and remove it the next...","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"da23857559a51e50dfad03cbc3c806ef719ac4d0","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            ns \u003d namespaces.RouterNamespace(router_id, self.conf, self.driver,"},{"line_number":353,"context_line":"                                            self.root_helper, self.use_ipv6)"},{"line_number":354,"context_line":"            self._rtr_nses[router_id] \u003d ns"},{"line_number":355,"context_line":"        else:"},{"line_number":356,"context_line":"            ns \u003d namespaces.RootNamespace()"},{"line_number":357,"context_line":"        ns.create()"},{"line_number":358,"context_line":"        self.process_router_add(ri)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_ec3d43de","line":355,"in_reply_to":"1a930d6b_f292994a","updated":"2015-01-27 17:00:47.000000000","message":"Agreed on the deprecation.  I guess maybe we should just remove RouterNamespace and introduce it later if it buys us anything.  I could go either way @Miguel.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            LOG.error(msg)"},{"line_number":229,"context_line":"            raise SystemExit(1)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _create_router_namespace(self, ri):"},{"line_number":232,"context_line":"        ri.ns \u003d namespaces.L3Namespace(ri.ns_name,"},{"line_number":233,"context_line":"                                       self.use_ipv6,"},{"line_number":234,"context_line":"                                       self.root_helper)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_5c6254ae","line":231,"updated":"2015-02-07 00:19:03.000000000","message":"Is this needed anywhere?  I see that you created a new method with the same name in router_info and you call it from there.  However, I don\u0027t see this one called anywhere.","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            LOG.error(msg)"},{"line_number":229,"context_line":"            raise SystemExit(1)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _create_router_namespace(self, ri):"},{"line_number":232,"context_line":"        ri.ns \u003d namespaces.L3Namespace(ri.ns_name,"},{"line_number":233,"context_line":"                                       self.use_ipv6,"},{"line_number":234,"context_line":"                                       self.root_helper)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_9c5cccef","line":231,"updated":"2015-02-07 00:19:03.000000000","message":"Is this needed anywhere?  I see that you created a new method with the same name in router_info and you call it from there.  However, I don\u0027t see this one called anywhere.","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":794,"context_line":"                                       ip_address,"},{"line_number":795,"context_line":"                                       self.conf.send_arp_for_ha,"},{"line_number":796,"context_line":"                                       self.root_helper)"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"    def external_gateway_removed(self, ri, ex_gw_port, interface_name):"},{"line_number":799,"context_line":"        if ri.router[\u0027distributed\u0027]:"},{"line_number":800,"context_line":"            self.process_router_floating_ip_nat_rules(ri)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_7c98f86a","line":797,"updated":"2015-02-07 00:19:03.000000000","message":"The next thing that I plan to tackle is the methods here for external gateway and internal networks.  I was planning to move them to the routers since there is distributed and ha stuff mixed up in here.","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            with self.namespaces_manager as ns_manager:"},{"line_number":1073,"context_line":"                self.fetch_and_sync_all_routers(context, ns_manager)"},{"line_number":1074,"context_line":"        except n_exc.AbortSyncRouters:"},{"line_number":1075,"context_line":"            self.fullsync \u003d True"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"    def fetch_and_sync_all_routers(self, context, ns_manager):"},{"line_number":1078,"context_line":"        prev_router_ids \u003d set(self.router_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_21a65954","line":1075,"updated":"2015-02-07 00:19:03.000000000","message":"In a future patch, I\u0027d like to avoid fullsync on all routers just because one router fails.  I wonder if we can just requeue the router that failed.","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"        except oslo_messaging.MessagingException:"},{"line_number":1089,"context_line":"            LOG.exception(_LE(\"Failed synchronizing routers due to RPC error\"))"},{"line_number":1090,"context_line":"            raise n_exc.AbortSyncRouters()"},{"line_number":1091,"context_line":"        except Exception:"},{"line_number":1092,"context_line":"            LOG.exception(_LE(\"Failed synchronizing routers\"))"},{"line_number":1093,"context_line":"            raise n_exc.AbortSyncRouters()"},{"line_number":1094,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_81b54580","line":1091,"updated":"2015-02-07 00:19:03.000000000","message":"I think we decided a little while ago to remove this extra condition from here.","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        self.router_info[router_id] \u003d ri"},{"line_number":382,"context_line":"        if self.conf.use_namespaces:"},{"line_number":383,"context_line":"            self._create_router_namespace(ri)"},{"line_number":384,"context_line":"        self.process_router_add(ri)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        if ri.is_ha:"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_437490fd","side":"PARENT","line":383,"updated":"2015-02-11 20:19:38.000000000","message":"When is create called?","commit_id":"254522ab267591f05f647ddfeae6ea3fb6076c96"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        self.router_info[router_id] \u003d ri"},{"line_number":382,"context_line":"        if self.conf.use_namespaces:"},{"line_number":383,"context_line":"            self._create_router_namespace(ri)"},{"line_number":384,"context_line":"        self.process_router_add(ri)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        if ri.is_ha:"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_ac798794","side":"PARENT","line":383,"in_reply_to":"da86d52c_437490fd","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"254522ab267591f05f647ddfeae6ea3fb6076c96"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            \u0027use_ipv6\u0027: self.use_ipv6,"},{"line_number":271,"context_line":"            \u0027agent_conf\u0027: self.conf,"},{"line_number":272,"context_line":"            \u0027interface_driver\u0027: self.driver,"},{"line_number":273,"context_line":"            \u0027process_monitor\u0027: self.process_monitor,"},{"line_number":274,"context_line":"        }"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        if router.get(\u0027distributed\u0027):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_2324fc0b","line":273,"updated":"2015-02-11 20:19:38.000000000","message":"Let\u0027s see why the process_monitor is going in here.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            \u0027use_ipv6\u0027: self.use_ipv6,"},{"line_number":271,"context_line":"            \u0027agent_conf\u0027: self.conf,"},{"line_number":272,"context_line":"            \u0027interface_driver\u0027: self.driver,"},{"line_number":273,"context_line":"            \u0027process_monitor\u0027: self.process_monitor,"},{"line_number":274,"context_line":"        }"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        if router.get(\u0027distributed\u0027):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_2cc11780","line":273,"in_reply_to":"da86d52c_2324fc0b","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":745,"context_line":"                    interface_name \u003d ("},{"line_number":746,"context_line":"                          self.get_snat_int_device_name(sn_port[\u0027id\u0027]))"},{"line_number":747,"context_line":"                    self._internal_network_added("},{"line_number":748,"context_line":"                        ns_name, sn_port[\u0027network_id\u0027], sn_port[\u0027id\u0027],"},{"line_number":749,"context_line":"                        sn_port[\u0027ip_cidr\u0027], sn_port[\u0027mac_address\u0027],"},{"line_number":750,"context_line":"                        interface_name, namespaces.SNAT_INT_DEV_PREFIX)"},{"line_number":751,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_662e028e","line":748,"updated":"2015-02-11 20:19:38.000000000","message":"nit:  I liked the way these arguments were lined up before (one per line).  I know it does fit the same way.  Maybe this:\n\n  self._internal_network_added(\n      ns_name,\n      sn_port[\u0027network_id\u0027],\n      sn_port[\u0027id\u0027],\n      sn_port[\u0027ip_cidr\u0027],\n      sn_port[\u0027mac_address\u0027],\n      interface_name,\n      namespaces.SNAT_INT_DEV_PREFIX)","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":745,"context_line":"                    interface_name \u003d ("},{"line_number":746,"context_line":"                          self.get_snat_int_device_name(sn_port[\u0027id\u0027]))"},{"line_number":747,"context_line":"                    self._internal_network_added("},{"line_number":748,"context_line":"                        ns_name, sn_port[\u0027network_id\u0027], sn_port[\u0027id\u0027],"},{"line_number":749,"context_line":"                        sn_port[\u0027ip_cidr\u0027], sn_port[\u0027mac_address\u0027],"},{"line_number":750,"context_line":"                        interface_name, namespaces.SNAT_INT_DEV_PREFIX)"},{"line_number":751,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_a64fe890","line":748,"in_reply_to":"da86d52c_662e028e","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":659,"context_line":""},{"line_number":660,"context_line":"    def get_external_device_name(self, port_id):"},{"line_number":661,"context_line":"        return (EXTERNAL_DEV_PREFIX + port_id)[:self.driver.DEV_NAME_LEN]"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"    def get_ns_name(self, router_id):"},{"line_number":664,"context_line":"        return (NS_PREFIX + router_id)"},{"line_number":665,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_e8240f62","side":"PARENT","line":662,"updated":"2015-02-13 22:49:35.000000000","message":"Note that you removed this but did not update the test agent at:\n\ntests/common/agents/l3_agent, which is why you had to do odd mocking in the functional test file.","commit_id":"efc8973359f79bfdd014131f13f951456339591c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":58,"context_line":"NS_PREFIX \u003d \u0027qrouter-\u0027"},{"line_number":59,"context_line":"INTERNAL_DEV_PREFIX \u003d \u0027qr-\u0027"},{"line_number":60,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_147ca0b4","side":"PARENT","line":59,"updated":"2015-02-25 00:30:47.000000000","message":"Just a crazy thought here.  These constants will move around a bit for the next few patches as code moves from this file to the router files until they settle.  I wonder if we should drop in the follow as a stop-gap to reduce the amount of change in this patch set and then revert all of the unnecessary changes in this patch (e.g. neutron/cmd/netns_cleanup.py, etc).\n\nINTERNAL_DEV_PREFIX \u003d namespaces.INTERNAL_DEV_PREFIX\nEXTERNAL_DEV_PREFIX \u003d namespaces.EXTERNAL_DEV_PREFIX\n\nAnd then a comment this these constants are just a stop-gap until all of the refactoring patches merge.","commit_id":"194afde3a64b70a934ec94f40550137ceacffbe2"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2fa30e2843662745515d5aafbc8a3c62e0ce4c3b","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":668,"context_line":"                self._snat_redirect_remove(ri, p, internal_interface)"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":671,"context_line":"                self.get_gw_port_host(ri.router) \u003d\u003d self.host):"},{"line_number":672,"context_line":"                ns_name \u003d ri.snat_namespace.name"},{"line_number":673,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_3ec33aee","line":670,"updated":"2015-02-25 06:18:04.000000000","message":"seems like a merge botch.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d971201f810d2401c2131802c580acf5546abc90","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":668,"context_line":"                self._snat_redirect_remove(ri, p, internal_interface)"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":671,"context_line":"                self.get_gw_port_host(ri.router) \u003d\u003d self.host):"},{"line_number":672,"context_line":"                ns_name \u003d ri.snat_namespace.name"},{"line_number":673,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_97979539","line":670,"in_reply_to":"ba7be1f8_3ec33aee","updated":"2015-02-25 14:53:13.000000000","message":"+1 Good catch.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":668,"context_line":"                self._snat_redirect_remove(ri, p, internal_interface)"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"            if self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and ("},{"line_number":671,"context_line":"                self.get_gw_port_host(ri.router) \u003d\u003d self.host):"},{"line_number":672,"context_line":"                ns_name \u003d ri.snat_namespace.name"},{"line_number":673,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_33491ab8","line":670,"in_reply_to":"ba7be1f8_97979539","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2fa30e2843662745515d5aafbc8a3c62e0ce4c3b","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if sn_port:"},{"line_number":738,"context_line":"                self._snat_redirect_add(ri, sn_port[\u0027fixed_ips\u0027][0]"},{"line_number":739,"context_line":"                                        [\u0027ip_address\u0027], port, interface_name)"},{"line_number":740,"context_line":"                if (self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and"},{"line_number":741,"context_line":"                    self.get_gw_port_host(ri.router) \u003d\u003d self.host):"},{"line_number":742,"context_line":"                    ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":743,"context_line":"                        ri.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_5eb46e81","line":740,"updated":"2015-02-25 06:18:04.000000000","message":"ditto.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if sn_port:"},{"line_number":738,"context_line":"                self._snat_redirect_add(ri, sn_port[\u0027fixed_ips\u0027][0]"},{"line_number":739,"context_line":"                                        [\u0027ip_address\u0027], port, interface_name)"},{"line_number":740,"context_line":"                if (self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and"},{"line_number":741,"context_line":"                    self.get_gw_port_host(ri.router) \u003d\u003d self.host):"},{"line_number":742,"context_line":"                    ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":743,"context_line":"                        ri.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_73f1d269","line":740,"in_reply_to":"ba7be1f8_37a8a976","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d971201f810d2401c2131802c580acf5546abc90","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if sn_port:"},{"line_number":738,"context_line":"                self._snat_redirect_add(ri, sn_port[\u0027fixed_ips\u0027][0]"},{"line_number":739,"context_line":"                                        [\u0027ip_address\u0027], port, interface_name)"},{"line_number":740,"context_line":"                if (self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and"},{"line_number":741,"context_line":"                    self.get_gw_port_host(ri.router) \u003d\u003d self.host):"},{"line_number":742,"context_line":"                    ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":743,"context_line":"                        ri.router[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_37a8a976","line":740,"in_reply_to":"ba7be1f8_5eb46e81","updated":"2015-02-25 14:53:13.000000000","message":"+1","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":948,"context_line":"        else:"},{"line_number":949,"context_line":"            LOG.debug(\u0027Processing :%r\u0027, routers)"},{"line_number":950,"context_line":"            for r in routers:"},{"line_number":951,"context_line":"                ns_manager.ids_to_keep.add(r[\u0027id\u0027])"},{"line_number":952,"context_line":"                update \u003d queue.RouterUpdate(r[\u0027id\u0027],"},{"line_number":953,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":954,"context_line":"                                            router\u003dr,"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_17d662f1","line":951,"updated":"2015-02-25 00:30:47.000000000","message":"Looking at the way this code uses ns_manager.ids_to_keep makes me think we should add a method (e.g. keep_router(router_id)) to NamespaceManager and make this private to that class.  That would be a little better encapsulation.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":948,"context_line":"        else:"},{"line_number":949,"context_line":"            LOG.debug(\u0027Processing :%r\u0027, routers)"},{"line_number":950,"context_line":"            for r in routers:"},{"line_number":951,"context_line":"                ns_manager.ids_to_keep.add(r[\u0027id\u0027])"},{"line_number":952,"context_line":"                update \u003d queue.RouterUpdate(r[\u0027id\u0027],"},{"line_number":953,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":954,"context_line":"                                            router\u003dr,"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_b62338a6","line":951,"in_reply_to":"ba7be1f8_17d662f1","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":961,"context_line":""},{"line_number":962,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":963,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"},{"line_number":964,"context_line":"                ns_manager.ids_to_keep.add(router_id)"},{"line_number":965,"context_line":"                update \u003d queue.RouterUpdate(router_id,"},{"line_number":966,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":967,"context_line":"                                            timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_f7d8ee1f","line":964,"updated":"2015-02-25 00:30:47.000000000","message":"ditto.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":961,"context_line":""},{"line_number":962,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":963,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"},{"line_number":964,"context_line":"                ns_manager.ids_to_keep.add(router_id)"},{"line_number":965,"context_line":"                update \u003d queue.RouterUpdate(router_id,"},{"line_number":966,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":967,"context_line":"                                            timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_d6398cd9","line":964,"in_reply_to":"ba7be1f8_f7d8ee1f","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2df6292e2c7ff6dcfcabea7cc2cf65808d81f11d","unresolved":false,"context_lines":[{"line_number":945,"context_line":"        except oslo_messaging.MessagingException:"},{"line_number":946,"context_line":"            LOG.exception(_LE(\"Failed synchronizing routers due to RPC error\"))"},{"line_number":947,"context_line":"            raise n_exc.AbortSyncRouters()"},{"line_number":948,"context_line":"        else:"},{"line_number":949,"context_line":"            LOG.debug(\u0027Processing :%r\u0027, routers)"},{"line_number":950,"context_line":"            for r in routers:"},{"line_number":951,"context_line":"                ns_manager.keep_router(r[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_2db24b06","line":948,"updated":"2015-03-03 04:06:12.000000000","message":"you can remove this \"else\" and de-indent the rest of code.","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"002e82b066e88b71c4c605c7c3d1d5d46ad80969","unresolved":false,"context_lines":[{"line_number":945,"context_line":"        except oslo_messaging.MessagingException:"},{"line_number":946,"context_line":"            LOG.exception(_LE(\"Failed synchronizing routers due to RPC error\"))"},{"line_number":947,"context_line":"            raise n_exc.AbortSyncRouters()"},{"line_number":948,"context_line":"        else:"},{"line_number":949,"context_line":"            LOG.debug(\u0027Processing :%r\u0027, routers)"},{"line_number":950,"context_line":"            for r in routers:"},{"line_number":951,"context_line":"                ns_manager.keep_router(r[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_b0ee8eeb","line":948,"in_reply_to":"ba7be1f8_2db24b06","updated":"2015-03-03 04:36:51.000000000","message":"That is out of the scope of this patch.","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"70f55c2677b3b205278093f7f15434df95ee9121","unresolved":false,"context_lines":[{"line_number":945,"context_line":"        except oslo_messaging.MessagingException:"},{"line_number":946,"context_line":"            LOG.exception(_LE(\"Failed synchronizing routers due to RPC error\"))"},{"line_number":947,"context_line":"            raise n_exc.AbortSyncRouters()"},{"line_number":948,"context_line":"        else:"},{"line_number":949,"context_line":"            LOG.debug(\u0027Processing :%r\u0027, routers)"},{"line_number":950,"context_line":"            for r in routers:"},{"line_number":951,"context_line":"                ns_manager.keep_router(r[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_d9a24dad","line":948,"in_reply_to":"ba7be1f8_b0ee8eeb","updated":"2015-03-03 06:54:45.000000000","message":"ok.","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"}],"neutron/agent/l3/dvr.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34fdb492cd3a5d59e90b8e84342e1f8aace04eed","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            FIP_LL_SUBNET)"},{"line_number":56,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START,"},{"line_number":57,"context_line":"                                        FIP_PR_END))"},{"line_number":58,"context_line":"        self._snat_nses \u003d {}"},{"line_number":59,"context_line":"        self._fip_nses \u003d {}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        super(AgentMixin, self).__init__(host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_7793804f","line":58,"updated":"2015-01-22 13:19:02.000000000","message":"nit: spell these two out for readability.","commit_id":"7196b407f2fa14df9781831643979ee9768a2dbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34fdb492cd3a5d59e90b8e84342e1f8aace04eed","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        snat_ns.destroy()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _destroy_fip_namespace(self, ns_name):"},{"line_number":79,"context_line":"        ex_net_id \u003d ns_name[len(namespaces.FIP_NS_PREFIX):]"},{"line_number":80,"context_line":"        fip_ns \u003d self._fip_nses[ex_net_id]"},{"line_number":81,"context_line":"        del self._fip_nses[ex_net_id]"},{"line_number":82,"context_line":"        fip_ns.destroy()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_b702486d","line":79,"updated":"2015-01-22 13:19:02.000000000","message":"Does it make sense to add a helper method (for readibility), like get_snat_router_id(), here for fip?","commit_id":"7196b407f2fa14df9781831643979ee9768a2dbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                LOG.debug(\u0027Unplugging DVR device %s\u0027, d.name)"},{"line_number":73,"context_line":"                self.driver.unplug(d.name, namespace\u003dns,"},{"line_number":74,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # TODO(mrsmith): delete ext-gw-port"},{"line_number":77,"context_line":"        LOG.debug(\u0027DVR: destroy snat ns: %s\u0027, ns)"},{"line_number":78,"context_line":"        if self.conf.router_delete_namespaces:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_f91550e5","side":"PARENT","line":75,"updated":"2015-01-25 23:52:19.000000000","message":"Was this TODO taken care of? If not please re-insert it. If you did, please split it out of this patch.","commit_id":"f2f06faf893f2cbac282e324591312695cc23908"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"12a981575e6074ab0c56333256345f3f3cad7d0d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                LOG.debug(\u0027Unplugging DVR device %s\u0027, d.name)"},{"line_number":73,"context_line":"                self.driver.unplug(d.name, namespace\u003dns,"},{"line_number":74,"context_line":"                                   prefix\u003dSNAT_INT_DEV_PREFIX)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # TODO(mrsmith): delete ext-gw-port"},{"line_number":77,"context_line":"        LOG.debug(\u0027DVR: destroy snat ns: %s\u0027, ns)"},{"line_number":78,"context_line":"        if self.conf.router_delete_namespaces:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_127372b5","side":"PARENT","line":75,"in_reply_to":"1a930d6b_f91550e5","updated":"2015-02-16 01:16:40.000000000","message":"This method was moved to the snat namespace class and the comment was preserved","commit_id":"f2f06faf893f2cbac282e324591312695cc23908"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            os.path.join(self.conf.state_path, \u0027fip-linklocal-networks\u0027),"},{"line_number":47,"context_line":"            FIP_LL_SUBNET)"},{"line_number":48,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START,"},{"line_number":49,"context_line":"                                        FIP_PR_END))"},{"line_number":50,"context_line":"        self._snat_nses \u003d {}"},{"line_number":51,"context_line":"        self._fip_nses \u003d {}"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_792a402d","line":49,"updated":"2015-01-25 23:52:19.000000000","message":"nses -\u003e namespaces","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"13da06754ea2a8a6eb776e33ac8f185ae73f86d4","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            os.path.join(self.conf.state_path, \u0027fip-linklocal-networks\u0027),"},{"line_number":47,"context_line":"            FIP_LL_SUBNET)"},{"line_number":48,"context_line":"        self.fip_priorities \u003d set(range(FIP_PR_START,"},{"line_number":49,"context_line":"                                        FIP_PR_END))"},{"line_number":50,"context_line":"        self._snat_nses \u003d {}"},{"line_number":51,"context_line":"        self._fip_nses \u003d {}"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_51ab8674","line":49,"in_reply_to":"1a930d6b_792a402d","updated":"2015-01-26 15:27:11.000000000","message":"+1 for both","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"13da06754ea2a8a6eb776e33ac8f185ae73f86d4","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            snat_ns.destroy()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _destroy_fip_namespace(self, ns_name):"},{"line_number":74,"context_line":"        ex_net_id \u003d ns_name[len(namespaces.FIP_NS_PREFIX):]"},{"line_number":75,"context_line":"        fip_ns \u003d self._fip_nses.pop(ex_net_id, None)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # If we don\u0027t have the external network id in the fip namespaces, agent"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_f1b392e6","line":74,"updated":"2015-01-26 15:27:11.000000000","message":"See my comment in PS3","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        # add fip-namespace and agent_gateway_port"},{"line_number":294,"context_line":"        ns \u003d namespaces.FipNamespace(network_id, self.conf, self.driver,"},{"line_number":295,"context_line":"                                     self.root_helper, self.use_ipv6)"},{"line_number":296,"context_line":"        ns.create()"},{"line_number":297,"context_line":"        self._fip_nses[network_id] \u003d ns"},{"line_number":298,"context_line":"        ri.fip_iptables_manager \u003d iptables_manager.IptablesManager("}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_19d69c28","line":295,"updated":"2015-01-25 23:52:19.000000000","message":"Maybe ns.create could return self? Then you could combine lines 296 and 297. Just an idea.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"94409fa8e96c39a63293ad3c511ddaff63da37f0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    def get_snat_int_device_name(self, port_id):"},{"line_number":90,"context_line":"        return (SNAT_INT_DEV_PREFIX +"},{"line_number":91,"context_line":"                port_id)[:self.driver.DEV_NAME_LEN]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def get_snat_interfaces(self, ri):"},{"line_number":94,"context_line":"        return ri.router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"ba7be1f8_e93c9131","line":92,"updated":"2015-03-03 14:14:04.000000000","message":"I think we need to temporarily keep get_snat_ns_name(), otherwise it\u0027ll break existing VPNaaS code that is expecting this method to exist.","commit_id":"73de61c9aa5458c64f42142d316042bac8c69096"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"468d7f836b00bf4747cdd63df26e8630b1352760","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                port_id)[:self.driver.DEV_NAME_LEN]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    # TODO(Carl) Remove this method when vpnaas no longer needs it."},{"line_number":94,"context_line":"    def get_snat_ns_name(self, router_id):"},{"line_number":95,"context_line":"        return (SNAT_NS_PREFIX + router_id)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def get_snat_interfaces(self, ri):"}],"source_content_type":"text/x-python","patch_set":34,"id":"9a80dd14_ac65c646","line":94,"updated":"2015-03-04 22:10:30.000000000","message":"I think we can skip this... there are other changes that are going to break the VPN code. As a result, I have 160983 that fixes VPN, of which we can try to push out immediately after this merges. This method would not be needed at that point. If you can, please review that commit.","commit_id":"01a7ba19cf6661b1aef7d08fb748bb2470caf28f"}],"neutron/agent/l3/dvr_fip_ns.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            use_ipv6\u003dself.use_ipv6)"},{"line_number":58,"context_line":"        path \u003d os.path.join(agent_conf.state_path, \u0027fip-linklocal-networks\u0027)"},{"line_number":59,"context_line":"        self.local_subnets \u003d lla.LinkLocalAllocator(path, FIP_LL_SUBNET)"},{"line_number":60,"context_line":"        self.destroyed \u003d False"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def get_name(self):"},{"line_number":63,"context_line":"        return (FIP_NS_PREFIX + self._ext_net_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_c8bd8bd9","line":60,"updated":"2015-02-13 22:49:35.000000000","message":"Please get rid of this method (It\u0027s superseded by router.fip_ns.name)","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4d077c35882fc491b648e083f5e1552175536cc3","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def delete(self):"},{"line_number":137,"context_line":"        self.destroyed \u003d True"},{"line_number":138,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dself.name)"},{"line_number":139,"context_line":"        for d in ip_wrapper.get_devices(exclude_loopback\u003dTrue):"},{"line_number":140,"context_line":"            if d.name.startswith(FIP_2_ROUTER_DEV_PREFIX):"},{"line_number":141,"context_line":"                # internal link between IRs and FIP NS"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba7be1f8_775f3a73","line":138,"updated":"2015-02-20 00:49:23.000000000","message":"root_helper is gone now.  There are many instances of this in this patch.  Instead of point them out, I\u0027ll just fix them up and upload a new patch set.","commit_id":"11d154d621d31011ba2d7bf069472a7cd8870a7a"}],"neutron/agent/l3/dvr_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            self.iptables_manager.ipv4[\u0027nat\u0027].add_rule(*rule)"},{"line_number":51,"context_line":"        self.iptables_manager.apply()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def create_dvr_gateway(self):"},{"line_number":54,"context_line":"        # TODO mlavalle in the near future, this method should contain the code"},{"line_number":55,"context_line":"        # in the L3 agent that creates a gateway for a dvr. The first step is"},{"line_number":56,"context_line":"        # to move the creation of the snat namespace here"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_dcc5643e","line":53,"updated":"2015-02-07 00:19:03.000000000","message":"gateway could be confusing here.  On a compute node, the dvr will have a gateway (through fip namespace).  But, this only has to do with the network node (where snat namespaces are).","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.floating_ip_removed_dist(ip_cidr)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def create_dvr_gateway(self):"},{"line_number":150,"context_line":"        # TODO(mlavalle): in the near future, this method should contain the"},{"line_number":151,"context_line":"        # code in the L3 agent that creates a gateway for a dvr. The first step"},{"line_number":152,"context_line":"        # is to move the creation of the snat namespace here"},{"line_number":153,"context_line":"        self.snat_namespace \u003d namespaces.SnatNamespace(self.router[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_46e49e3b","line":150,"updated":"2015-02-11 20:19:38.000000000","message":"I have plans to take care of this soon.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        super(DvrRouter, self).remove_floating_ip(device, ip_cidr)"},{"line_number":141,"context_line":"        self.floating_ip_removed_dist(ip_cidr)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def create_dvr_gateway(self):"},{"line_number":144,"context_line":"        # TODO(mlavalle): in the near future, this method should contain the"},{"line_number":145,"context_line":"        # code in the L3 agent that creates a gateway for a dvr. The first step"},{"line_number":146,"context_line":"        # is to move the creation of the snat namespace here"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_77c87ea8","line":143,"updated":"2015-02-25 00:30:47.000000000","message":"I wonder if this should be called create_snat_namespace","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        super(DvrRouter, self).remove_floating_ip(device, ip_cidr)"},{"line_number":141,"context_line":"        self.floating_ip_removed_dist(ip_cidr)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def create_dvr_gateway(self):"},{"line_number":144,"context_line":"        # TODO(mlavalle): in the near future, this method should contain the"},{"line_number":145,"context_line":"        # code in the L3 agent that creates a gateway for a dvr. The first step"},{"line_number":146,"context_line":"        # is to move the creation of the snat namespace here"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_1676c43e","line":143,"in_reply_to":"ba7be1f8_77c87ea8","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        self.snat_namespace.create()"},{"line_number":152,"context_line":"        return self.snat_namespace"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def external_gateway_removed(self):"},{"line_number":155,"context_line":"        # TODO(mlavalle): in the near future, this method should contain the"},{"line_number":156,"context_line":"        # code in the L3 agent that removes an external gateway for a dvr. The"},{"line_number":157,"context_line":"        # first step is to move the deletion of the snat namespace here"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_d7c20a84","line":154,"updated":"2015-02-25 00:30:47.000000000","message":"ditto with delete_snat_namespace","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        self.snat_namespace.create()"},{"line_number":152,"context_line":"        return self.snat_namespace"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def external_gateway_removed(self):"},{"line_number":155,"context_line":"        # TODO(mlavalle): in the near future, this method should contain the"},{"line_number":156,"context_line":"        # code in the L3 agent that removes an external gateway for a dvr. The"},{"line_number":157,"context_line":"        # first step is to move the deletion of the snat namespace here"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_b60fb887","line":154,"in_reply_to":"ba7be1f8_d7c20a84","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"}],"neutron/agent/l3/dvr_snat_ns.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        name \u003d self.get_snat_ns_name(router_id)"},{"line_number":27,"context_line":"        super(SnatNamespace, self).__init__("},{"line_number":28,"context_line":"            name, agent_conf, driver, root_helper, use_ipv6)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @classmethod"},{"line_number":31,"context_line":"    def get_snat_ns_name(cls, router_id):"},{"line_number":32,"context_line":"        return (SNAT_NS_PREFIX + router_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_a8e77745","line":29,"updated":"2015-02-13 22:49:35.000000000","message":"Please get rid of this method (It\u0027s superseded by router.snat_namespace.name)","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"05f114ef3f7e1a3ac5beecd471e112f8bcd401c5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        name \u003d self.get_snat_ns_name(router_id)"},{"line_number":27,"context_line":"        super(SnatNamespace, self).__init__("},{"line_number":28,"context_line":"            name, agent_conf, driver, root_helper, use_ipv6)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @classmethod"},{"line_number":31,"context_line":"    def get_snat_ns_name(cls, router_id):"},{"line_number":32,"context_line":"        return (SNAT_NS_PREFIX + router_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_e89319fe","line":29,"in_reply_to":"da86d52c_a8e77745","updated":"2015-02-16 01:55:07.000000000","message":"Assaf,\n\nIn principle I agree with you. We should get rid of this method and others similar to it. In fact, at some point, I had done just that. But then I realized that there are certain places in the agent code that require this method. Please bear with me for a long explanation:\n\nI traced with pdb the execution of test_dvr_router_lifecycle_without_ha_with_snat_with_fips in neutron/tests/functional/agent/test_l3_agent.py. The test case generates a router_info like the following:\n\n{\u0027_floatingips\u0027: [{\u0027fixed_ip_address\u0027: \u002710.0.0.1\u0027,\n                   \u0027floating_ip_address\u0027: \u002719.4.4.2\u0027,\n                   \u0027floating_network_id\u0027: \u002723ea20b7-0f3e-457a-8333-55db4d58c7f5\u0027,\n                   \u0027host\u0027: \u0027agent1\u0027,\n                   \u0027id\u0027: \u0027d4e8886e-6b1b-4287-8a74-6be637673f58\u0027,\n                   \u0027port_id\u0027: \u0027e1452b23-53f7-4d1f-b275-523320baa6a9\u0027,\n                   \u0027status\u0027: \u0027ACTIVE\u0027}],\n \u0027_interfaces\u0027: [{\u0027admin_state_up\u0027: True,\n                  \u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u002735.4.0.4\u0027,\n                                 \u0027subnet_id\u0027: \u00279115244e-3174-4495-b75f-488c520a7666\u0027}],\n                  \u0027id\u0027: \u0027e1452b23-53f7-4d1f-b275-523320baa6a9\u0027,\n                  \u0027mac_address\u0027: \u0027ca:fe:de:ad:be:ef\u0027,\n                  \u0027network_id\u0027: \u00279167f2a6-8481-4a18-9135-f8bbf9af8dc6\u0027,\n                  \u0027subnet\u0027: {\u0027cidr\u0027: \u002735.4.0.0/24\u0027,\n                             \u0027gateway_ip\u0027: \u002735.4.0.1\u0027,\n                             \u0027ipv6_address_mode\u0027: None,\n                             \u0027ipv6_ra_mode\u0027: None}}],\n \u0027_snat_router_interfaces\u0027: [{\u0027device_id\u0027: \u0027fcef3af4-a7cb-4cce-9232-19bf4c7a9c24\u0027,\n                              \u0027device_owner\u0027: \u0027network:router_centralized_snat\u0027,\n                              \u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u002735.4.0.9\u0027,\n                                             \u0027subnet_id\u0027: \u00279115244e-3174-4495-b75f-488c520a7666\u0027}],\n                              \u0027id\u0027: \u0027690e7f57-6c50-49ca-8458-7bcc615d448f\u0027,\n                              \u0027mac_address\u0027: \u0027fa:16:3e:80:8d:89\u0027,\n                              \u0027network_id\u0027: \u00279167f2a6-8481-4a18-9135-f8bbf9af8dc6\u0027,\n                              \u0027subnet\u0027: {\u0027cidr\u0027: \u002735.4.0.0/24\u0027,\n                                         \u0027gateway_ip\u0027: \u002735.4.0.1\u0027,\n                                         \u0027id\u0027: \u00279115244e-3174-4495-b75f-488c520a7666\u0027}}],\n \u0027distributed\u0027: True,\n \u0027enable_snat\u0027: True,\n \u0027gw_port\u0027: {\u0027binding:host_id\u0027: \u0027agent1\u0027,\n             \u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u002719.4.4.4\u0027,\n                            \u0027subnet_id\u0027: \u00277feabf8d-76c2-4091-bcac-1ae79f86e7ce\u0027}],\n             \u0027id\u0027: \u002715c97a20-c48c-4a6c-8de9-44c84d6e5b34\u0027,\n             \u0027mac_address\u0027: \u0027ca:fe:de:ad:be:ee\u0027,\n             \u0027network_id\u0027: \u002723ea20b7-0f3e-457a-8333-55db4d58c7f5\u0027,\n             \u0027subnet\u0027: {\u0027cidr\u0027: \u002719.4.4.0/24\u0027, \u0027gateway_ip\u0027: \u002719.4.4.1\u0027}},\n \u0027gw_port_host\u0027: \u0027agent1\u0027,\n \u0027id\u0027: \u00279efda1ee-e57d-4d15-a227-25ca690b0a8e\u0027,\n \u0027routes\u0027: []}\n\nWhen this router gets to method internal_network_added in the agent, it is processed by the following code (for this, I am using code in master branch): \n\n                if (self.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027 and\n                    self.get_gw_port_host(ri.router) \u003d\u003d self.host):\n                    ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027])\n                    self._set_subnet_info(sn_port)\n                    interface_name \u003d (\n                          self.get_snat_int_device_name(sn_port[\u0027id\u0027]))\n                    self._internal_network_added(ns_name,\n                                                 sn_port[\u0027network_id\u0027],\n                                                 sn_port[\u0027id\u0027],\n                                                 sn_port[\u0027ip_cidr\u0027],\n                                                 sn_port[\u0027mac_address\u0027],\n                                                 interface_name,\n                                                 dvr.SNAT_INT_DEV_PREFIX)\n\nIf I replace line  ns_name \u003d self.get_snat_ns_name(ri.router[\u0027id\u0027]) with ns_name \u003d ri.snat_namespace.name we will get an exception, because at this point, the dvr gateway hasn\u0027t been added and the snat namespace hasn\u0027t been created. What happens next is that method _internal_network_added in the agent get called and plugs the _snat_router_interface and the driver code creates the namespace. It seems to me this namespace creation happens behind the scenes.\n\nAfter this, the processing of this router gets to method external_gateway_added in the agent, which calls _create_dvr_gateway in dvr.py. In this method the namespace is created again (explicitly now) and the  _snat_router_interface is plugged again using the same method as above, _internal_network.\n\nDo we need to create the snat name space and plug the _snat_router_interface twice during a single router processing? Or is this an error in the agent? Or is this a result of how the functional tests was structured and this will never happen in real life?","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7ae4557d8f62097ae89bfcf2b6dff3f1e9df76c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        name \u003d self.get_snat_ns_name(router_id)"},{"line_number":27,"context_line":"        super(SnatNamespace, self).__init__("},{"line_number":28,"context_line":"            name, agent_conf, driver, root_helper, use_ipv6)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @classmethod"},{"line_number":31,"context_line":"    def get_snat_ns_name(cls, router_id):"},{"line_number":32,"context_line":"        return (SNAT_NS_PREFIX + router_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_65318f0a","line":29,"in_reply_to":"da86d52c_e89319fe","updated":"2015-02-18 21:58:15.000000000","message":"I\u0027ll be happy if someone wants to create a follow-on patch to address this.  I\u0027m okay to accept this the way it is now.","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"}],"neutron/agent/l3/namespace_manager.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class NamespaceManager(object):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    \"\"\"Keeps track of namespaces that need to be cleaned up."}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_a8613713","line":21,"updated":"2015-02-13 22:49:35.000000000","message":"Please consider adding a few simple functional tests for this class, outside of the l3_agent functional tests.","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                ns.delete()"},{"line_number":93,"context_line":"            except RuntimeError:"},{"line_number":94,"context_line":"                LOG.exception(_LE(\u0027Failed to destroy stale namespace %s\u0027), ns)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def get_prefix_and_id(self, ns_name):"},{"line_number":97,"context_line":"        \"\"\"Get the prefix and id from the namespace name."},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_c8982b1e","line":95,"updated":"2015-02-13 22:49:35.000000000","message":"You might have to override this in the test agent somehow because this assumes that you don\u0027t have the agent name as a suffix.","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c41a3863f7783136c41540baab4e766bc0dc266c","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            self._all_namespaces \u003d self.list_all()"},{"line_number":65,"context_line":"        return self"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def __exit__(self, type, value, traceback):"},{"line_number":68,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"},{"line_number":69,"context_line":"        # namespaces was only done once after restart.  Still a good idea?"},{"line_number":70,"context_line":"        if not self._clean_stale or type:"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_03ffd466","line":67,"updated":"2015-02-19 13:33:50.000000000","message":"nit: type is a built-in for Python. Maybe use exc_type?","commit_id":"b5484fcfce54639e66e5afb4bed7f52cfb2f7aa8"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"9c680ff220ecfcca5af6b94c84ae12f25f16c2fe","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            self._all_namespaces \u003d self.list_all()"},{"line_number":65,"context_line":"        return self"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def __exit__(self, type, value, traceback):"},{"line_number":68,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"},{"line_number":69,"context_line":"        # namespaces was only done once after restart.  Still a good idea?"},{"line_number":70,"context_line":"        if not self._clean_stale or type:"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_1fc1d22e","line":67,"in_reply_to":"da86d52c_03ffd466","updated":"2015-02-19 21:45:45.000000000","message":"Paul,\n\nThanks. Done!","commit_id":"b5484fcfce54639e66e5afb4bed7f52cfb2f7aa8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    agent restarts gracefully."},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def __init__(self, agent_conf, driver, clean_stale\u003dFalse):"},{"line_number":44,"context_line":"        \"\"\"Initialize the NamespaceManager."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        :param agent_conf configuration from l3 agent"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_f7738e4b","line":43,"updated":"2015-02-25 00:30:47.000000000","message":"I don\u0027t think clean_stale should have a default argument.  It isn\u0027t necessary and doesn\u0027t make much sense.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    agent restarts gracefully."},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def __init__(self, agent_conf, driver, clean_stale\u003dFalse):"},{"line_number":44,"context_line":"        \"\"\"Initialize the NamespaceManager."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        :param agent_conf configuration from l3 agent"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_968394cb","line":43,"in_reply_to":"ba7be1f8_f7738e4b","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :driver driver to perform operations on devices"},{"line_number":48,"context_line":"        :param clean_stale Whether to try to clean stale namespaces"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        super(NamespaceManager, self).__init__()"},{"line_number":51,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":52,"context_line":"        self.driver \u003d driver"},{"line_number":53,"context_line":"        self._clean_stale \u003d clean_stale"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_17fe62ae","line":50,"updated":"2015-02-25 00:30:47.000000000","message":"nit:  Calling super isn\u0027t necessary.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :driver driver to perform operations on devices"},{"line_number":48,"context_line":"        :param clean_stale Whether to try to clean stale namespaces"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        super(NamespaceManager, self).__init__()"},{"line_number":51,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":52,"context_line":"        self.driver \u003d driver"},{"line_number":53,"context_line":"        self._clean_stale \u003d clean_stale"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_b686d8d9","line":50,"in_reply_to":"ba7be1f8_17fe62ae","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.driver \u003d driver"},{"line_number":53,"context_line":"        self._clean_stale \u003d clean_stale"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":56,"context_line":"        self.ids_to_keep \u003d set()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __enter__(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_57337aaa","line":55,"updated":"2015-02-25 00:30:47.000000000","message":"nit:  Don\u0027t initialize _all_namespaces here.  It is initialized in __enter__ which is more appropriate and makes this redundant.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.driver \u003d driver"},{"line_number":53,"context_line":"        self._clean_stale \u003d clean_stale"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":56,"context_line":"        self.ids_to_keep \u003d set()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __enter__(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_d6534c6a","line":55,"in_reply_to":"ba7be1f8_57337aaa","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self._clean_stale \u003d clean_stale"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":56,"context_line":"        self.ids_to_keep \u003d set()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __enter__(self):"},{"line_number":59,"context_line":"        self._all_namespaces \u003d set()"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_37dfe60e","line":56,"updated":"2015-02-25 00:30:47.000000000","message":"Ditto for ids_to_keep.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self._clean_stale \u003d clean_stale"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":56,"context_line":"        self.ids_to_keep \u003d set()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __enter__(self):"},{"line_number":59,"context_line":"        self._all_namespaces \u003d set()"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_f64e90c1","line":56,"in_reply_to":"ba7be1f8_37dfe60e","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __enter__(self):"},{"line_number":59,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":60,"context_line":"        self.ids_to_keep \u003d set()"},{"line_number":61,"context_line":"        if self._clean_stale:"},{"line_number":62,"context_line":"            self._all_namespaces \u003d self.list_all()"},{"line_number":63,"context_line":"        return self"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_f7ef0eaf","line":60,"updated":"2015-02-25 00:30:47.000000000","message":"I mentioned in agent.py that I think we should make this set private to this class and add a method to this class to add a router to keep.\n\n  def keep_router(self, router_id):\n      self._ids_to_keep.add(router_id)","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __enter__(self):"},{"line_number":59,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":60,"context_line":"        self.ids_to_keep \u003d set()"},{"line_number":61,"context_line":"        if self._clean_stale:"},{"line_number":62,"context_line":"            self._all_namespaces \u003d self.list_all()"},{"line_number":63,"context_line":"        return self"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_d688acc8","line":60,"in_reply_to":"ba7be1f8_f7ef0eaf","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    def __exit__(self, exc_type, value, traceback):"},{"line_number":66,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"},{"line_number":67,"context_line":"        # namespaces was only done once after restart.  Still a good idea?"},{"line_number":68,"context_line":"        if not self._clean_stale or exc_type:"},{"line_number":69,"context_line":"            return"},{"line_number":70,"context_line":"        self._clean_stale \u003d False"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_b74036a6","line":68,"updated":"2015-02-25 00:30:47.000000000","message":"I think I\u0027d like to split this in to two separate if statements.  This if represents two very different reasons to return from this method without any action.  To me, they feel like they should be kept separate.\n\nAlso, what should we be doing with exc_type?  Is it okay to just return?  I guess as long as it doesn\u0027t return True then it will not supress the exception.  That is probably good.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    def __exit__(self, exc_type, value, traceback):"},{"line_number":66,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"},{"line_number":67,"context_line":"        # namespaces was only done once after restart.  Still a good idea?"},{"line_number":68,"context_line":"        if not self._clean_stale or exc_type:"},{"line_number":69,"context_line":"            return"},{"line_number":70,"context_line":"        self._clean_stale \u003d False"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_79bd33d7","line":68,"in_reply_to":"ba7be1f8_b74036a6","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                continue"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            try:"},{"line_number":78,"context_line":"                if _ns_prefix \u003d\u003d namespaces.NS_PREFIX:"},{"line_number":79,"context_line":"                    ns \u003d namespaces.RouterNamespace(ns_id,"},{"line_number":80,"context_line":"                                                    self.agent_conf,"},{"line_number":81,"context_line":"                                                    self.driver,"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_770a3e7a","line":78,"updated":"2015-02-25 00:30:47.000000000","message":"There is no longer anything in these initializers that we expect could raise a RuntimeError.  Move these outside of the try and just keep the try around the delete on L88.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                continue"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            try:"},{"line_number":78,"context_line":"                if _ns_prefix \u003d\u003d namespaces.NS_PREFIX:"},{"line_number":79,"context_line":"                    ns \u003d namespaces.RouterNamespace(ns_id,"},{"line_number":80,"context_line":"                                                    self.agent_conf,"},{"line_number":81,"context_line":"                                                    self.driver,"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_d65d0c4a","line":78,"in_reply_to":"ba7be1f8_770a3e7a","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        :param ns_name The name of the namespace"},{"line_number":96,"context_line":"        :returns: tuple with prefix and id or None if no prefix matches"},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":"        for prefix in [namespaces.NS_PREFIX, dvr_snat_ns.SNAT_NS_PREFIX]:"},{"line_number":99,"context_line":"            if ns_name.startswith(prefix):"},{"line_number":100,"context_line":"                return (prefix, ns_name[len(prefix):])"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_17a58246","line":98,"updated":"2015-02-25 00:30:47.000000000","message":"Just a thought, feel free to ignore.  I wonder if instead of hard-coding prefixes here, we should strip the uuid from the end first since we know how long it will be and then the prefix will be whatever is left.\n\nI guess that we need to hard-code the prefixes for \"is_managed\" below to work right.  So, I don\u0027t know.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        :param ns_name The name of the namespace"},{"line_number":96,"context_line":"        :returns: tuple with prefix and id or None if no prefix matches"},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":"        for prefix in [namespaces.NS_PREFIX, dvr_snat_ns.SNAT_NS_PREFIX]:"},{"line_number":99,"context_line":"            if ns_name.startswith(prefix):"},{"line_number":100,"context_line":"                return (prefix, ns_name[len(prefix):])"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_d9945f46","line":98,"in_reply_to":"ba7be1f8_17a58246","updated":"2015-02-28 01:15:22.000000000","message":"I feel comfortable with this approach, so I think we should leave it like this","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2df6292e2c7ff6dcfcabea7cc2cf65808d81f11d","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        :param agent_conf configuration from l3 agent"},{"line_number":47,"context_line":"        :driver driver to perform operations on devices"},{"line_number":48,"context_line":"        :param clean_stale Whether to try to clean stale namespaces"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":51,"context_line":"        self.driver \u003d driver"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_8da17796","line":48,"updated":"2015-03-03 04:06:12.000000000","message":":param parameter_name: description","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26d95258259096f80cecea8f5e8d377317a66467","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        :param agent_conf configuration from l3 agent"},{"line_number":47,"context_line":"        :driver driver to perform operations on devices"},{"line_number":48,"context_line":"        :param clean_stale Whether to try to clean stale namespaces"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":51,"context_line":"        self.driver \u003d driver"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_f061e639","line":48,"in_reply_to":"ba7be1f8_8da17796","updated":"2015-03-03 04:47:36.000000000","message":"Done","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"}],"neutron/agent/l3/namespaces.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2a6ee09e8fd7d4e34b0e2b992090cc252d0a6bc5","unresolved":false,"context_lines":[{"line_number":23,"context_line":"NS_PREFIX \u003d \u0027qrouter-\u0027"},{"line_number":24,"context_line":"INTERNAL_DEV_PREFIX \u003d \u0027qr-\u0027"},{"line_number":25,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":26,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"},{"line_number":27,"context_line":"SNAT_INT_DEV_PREFIX \u003d \u0027sg-\u0027"},{"line_number":28,"context_line":"FIP_NS_PREFIX \u003d \u0027fip-\u0027"},{"line_number":29,"context_line":"FIP_2_ROUTER_DEV_PREFIX \u003d \u0027fpr-\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_58fa99ba","line":26,"updated":"2015-01-16 18:24:58.000000000","message":"How about moving these away from being global constants to being class constants?  (e.g. SnatNamespace.PREFIX)","commit_id":"ed774c070214c9b0439d3c3405e03191b92442d2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"34fdb492cd3a5d59e90b8e84342e1f8aace04eed","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_b75ec874","line":1,"updated":"2015-01-22 13:19:02.000000000","message":"Openstack Foundation copyright","commit_id":"7196b407f2fa14df9781831643979ee9768a2dbc"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"13da06754ea2a8a6eb776e33ac8f185ae73f86d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_f101d26a","line":1,"updated":"2015-01-26 15:27:11.000000000","message":"See comment in PS3","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"NS_PREFIX \u003d \u0027qrouter-\u0027"},{"line_number":24,"context_line":"INTERNAL_DEV_PREFIX \u003d \u0027qr-\u0027"},{"line_number":25,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":26,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_7986c014","line":23,"updated":"2015-01-25 23:52:19.000000000","message":"I\u0027m not sure why you moved the device prefixes here. I wouldn\u0027t expect to find them here if I were to look for them.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"NS_PREFIX \u003d \u0027qrouter-\u0027"},{"line_number":24,"context_line":"INTERNAL_DEV_PREFIX \u003d \u0027qr-\u0027"},{"line_number":25,"context_line":"EXTERNAL_DEV_PREFIX \u003d \u0027qg-\u0027"},{"line_number":26,"context_line":"SNAT_NS_PREFIX \u003d \u0027snat-\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_0e255008","line":23,"in_reply_to":"1a930d6b_7986c014","updated":"2015-01-26 20:01:11.000000000","message":"+1 See https://review.openstack.org/#/c/149793/.  They\u0027ll move to router classes I think.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":30,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":31,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class Namespace(object):"},{"line_number":35,"context_line":"    def __init__(self, name, root_helper):"},{"line_number":36,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_3997d83c","line":33,"updated":"2015-01-25 23:52:19.000000000","message":"Is there a reason not to squash this class and \"L3Namespace\" class? Does this class provide any value on its own? Let\u0027s try not to create monstrous inheritance trees...","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":30,"context_line":"FIP_EXT_DEV_PREFIX \u003d \u0027fg-\u0027"},{"line_number":31,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class Namespace(object):"},{"line_number":35,"context_line":"    def __init__(self, name, root_helper):"},{"line_number":36,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_2e4cccc7","line":33,"in_reply_to":"1a930d6b_3997d83c","updated":"2015-01-26 20:01:11.000000000","message":"I\u0027m okay to squash them in this patch.  If these namespaces are ever reused by other agents them there may be a need to differentiate at that point.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"56841b6ea47472c7678589859442bc97bb96c502","unresolved":false,"context_lines":[{"line_number":31,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class Namespace(object):"},{"line_number":35,"context_line":"    def __init__(self, name, root_helper):"},{"line_number":36,"context_line":"        self.name \u003d name"},{"line_number":37,"context_line":"        self.root_helper \u003d root_helper"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_07c47cf3","line":34,"updated":"2015-01-25 14:59:35.000000000","message":"Namespace class seems not to be specific to l3 agent ... to move in ip_lib module?\n\nimo, Namespace and its subclasses should respect the same interface and define the same methods (create/delete/destroy).","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"class Namespace(object):"},{"line_number":35,"context_line":"    def __init__(self, name, root_helper):"},{"line_number":36,"context_line":"        self.name \u003d name"},{"line_number":37,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":38,"context_line":"        self.ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def create(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_d99df467","line":37,"updated":"2015-01-25 23:52:19.000000000","message":"I\u0027m kind of confused you persist a root wrapper without a namespace but don\u0027t persist one with the namespace. You return that one in the create command and then subclasses use that return value as a local variable. Why not hold the namespace ip wrapper as a member as well? Would that simplify things or complicate them?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if self.use_ipv6:"},{"line_number":57,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv6.conf.all.forwarding\u003d1\u0027]"},{"line_number":58,"context_line":"            ip_wrapper.netns.execute(cmd)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def delete(self):"},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            self.ip_wrapper_root.netns.delete(self.name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_99d0cc20","line":59,"updated":"2015-01-25 23:52:19.000000000","message":"I have an issue with both delete and destroy existing in this world... Is delete used by other classes? Maybe add a preceding underscore? If it is, we need to think of a better naming scheme. Also, docstrings would help.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if self.use_ipv6:"},{"line_number":57,"context_line":"            cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv6.conf.all.forwarding\u003d1\u0027]"},{"line_number":58,"context_line":"            ip_wrapper.netns.execute(cmd)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def delete(self):"},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            self.ip_wrapper_root.netns.delete(self.name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_8ec300ec","line":59,"in_reply_to":"1a930d6b_99d0cc20","updated":"2015-01-26 20:01:11.000000000","message":"+1  It is a bit confusing to have them both.  This might have been my fault but it was inadvertent.  They should be the same method and the sub-classes should call super(...).delete(...)","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"56841b6ea47472c7678589859442bc97bb96c502","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        super(RouterNamespace, self).__init__(name, agent_conf, driver,"},{"line_number":74,"context_line":"                                              root_helper, use_ipv6)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def destroy(self):"},{"line_number":77,"context_line":"        ra.disable_ipv6_ra(self.router_id, self.name, self.root_helper)"},{"line_number":78,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dself.name)"},{"line_number":79,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_27b5f87d","line":76,"updated":"2015-01-25 14:59:35.000000000","message":"What is the difference between delete/destroy?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        super(RouterNamespace, self).__init__(name, agent_conf, driver,"},{"line_number":74,"context_line":"                                              root_helper, use_ipv6)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def destroy(self):"},{"line_number":77,"context_line":"        ra.disable_ipv6_ra(self.router_id, self.name, self.root_helper)"},{"line_number":78,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dself.name)"},{"line_number":79,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_ceb9887a","line":76,"in_reply_to":"1a930d6b_27b5f87d","updated":"2015-01-26 20:01:11.000000000","message":"ditto","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                    namespace\u003dself.name,"},{"line_number":91,"context_line":"                    prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        if self.agent_conf.router_delete_namespaces:"},{"line_number":94,"context_line":"            self.delete()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_4ee03896","line":93,"updated":"2015-01-26 20:01:11.000000000","message":"This check should probably move to the super class in the delete method.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                    prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        if self.agent_conf.router_delete_namespaces:"},{"line_number":94,"context_line":"            self.delete()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class SnatNamespace(L3Namespace):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_6ec97425","line":94,"updated":"2015-01-26 20:01:11.000000000","message":"This could be a call to super.delete.","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"94678f77b9b82b2a91547027f8dc9cc90b3747c3","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        if self.agent_conf.router_delete_namespaces:"},{"line_number":142,"context_line":"            self.delete()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class RootNamespace(object):"},{"line_number":146,"context_line":"    def create(self):"},{"line_number":147,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_3990b849","line":144,"updated":"2015-01-25 23:52:19.000000000","message":"Can we get rid of this?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        if self.agent_conf.router_delete_namespaces:"},{"line_number":142,"context_line":"            self.delete()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"class RootNamespace(object):"},{"line_number":146,"context_line":"    def create(self):"},{"line_number":147,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_ce38a83f","line":144,"in_reply_to":"1a930d6b_3990b849","updated":"2015-01-26 20:01:11.000000000","message":"Justification?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":9380,"name":"Sayaji Patil","email":"sayaji15@gmail.com","username":"Sayaji"},"change_message_id":"47b63c1b37b1a96acb7b996fbac7825b1c71e9cc","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                                              root_helper, use_ipv6)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @classmethod"},{"line_number":78,"context_line":"    def _get_ns_name(cls, router_id):"},{"line_number":79,"context_line":"        return (NS_PREFIX + router_id)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def delete(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_980a2126","line":78,"updated":"2015-02-06 19:37:40.000000000","message":"Why is this a classmethod ?","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d6959e4baf5b1df8091322274ef2a6c352577310","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                                              root_helper, use_ipv6)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @classmethod"},{"line_number":78,"context_line":"    def _get_ns_name(cls, router_id):"},{"line_number":79,"context_line":"        return (NS_PREFIX + router_id)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def delete(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_3fad1fea","line":78,"in_reply_to":"da86d52c_980a2126","updated":"2015-02-10 23:21:57.000000000","message":"Done","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    namespace\u003dself.name,"},{"line_number":96,"context_line":"                    prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if self.agent_conf.router_delete_namespaces:"},{"line_number":99,"context_line":"            super(RouterNamespace, self).delete()"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_dc3ac433","line":98,"updated":"2015-02-07 00:19:03.000000000","message":"I\u0027d rather the if go in the super class.","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d6959e4baf5b1df8091322274ef2a6c352577310","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    namespace\u003dself.name,"},{"line_number":96,"context_line":"                    prefix\u003dEXTERNAL_DEV_PREFIX)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if self.agent_conf.router_delete_namespaces:"},{"line_number":99,"context_line":"            super(RouterNamespace, self).delete()"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_5fb6533f","line":98,"in_reply_to":"da86d52c_dc3ac433","updated":"2015-02-10 23:21:57.000000000","message":"Done","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"26836c02dd413a39d3706c45ffd6cba711024753","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            super(SnatNamespace, self).delete()"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"class FipNamespace(L3Namespace):"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def __init__(self, ext_net_id, agent_conf, driver, root_helper,"},{"line_number":132,"context_line":"                 use_ipv6\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_1cd7fcee","line":129,"updated":"2015-02-07 00:19:03.000000000","message":"There is a dvr_fip_ns.py file now.  This needs to be reconciled.","commit_id":"a864b0bb3b5da44527057bdabc848541b4c7487e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class Namespace(object):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def __init__(self, name, agent_conf, driver, root_helper, use_ipv6\u003dNone):"},{"line_number":36,"context_line":"        self.name \u003d name"},{"line_number":37,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":38,"context_line":"        self.ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_69c25354","line":35,"updated":"2015-02-11 20:19:38.000000000","message":"A default of None doesn\u0027t make sense to me.  It should be a boolean and I\u0027m not sure why it would have a default.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class Namespace(object):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def __init__(self, name, agent_conf, driver, root_helper, use_ipv6\u003dNone):"},{"line_number":36,"context_line":"        self.name \u003d name"},{"line_number":37,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":38,"context_line":"        self.ip_wrapper_root \u003d ip_lib.IPWrapper(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_ccb23b05","line":35,"in_reply_to":"da86d52c_69c25354","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        return (NS_PREFIX + router_id)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def delete(self):"},{"line_number":75,"context_line":"        ra.disable_ipv6_ra(self.router_id, self.process_monitor)"},{"line_number":76,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dself.name)"},{"line_number":77,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":78,"context_line":"            if d.name.startswith(INTERNAL_DEV_PREFIX):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_a931ab5b","line":75,"updated":"2015-02-11 20:19:38.000000000","message":"I don\u0027t think this should be here.  I think the Router should be responsible for ipv6_ra, not the Namespace.  It doesn\u0027t seem like a namespace concern.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        return (NS_PREFIX + router_id)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def delete(self):"},{"line_number":75,"context_line":"        ra.disable_ipv6_ra(self.router_id, self.process_monitor)"},{"line_number":76,"context_line":"        ns_ip \u003d ip_lib.IPWrapper(self.root_helper, namespace\u003dself.name)"},{"line_number":77,"context_line":"        for d in ns_ip.get_devices(exclude_loopback\u003dTrue):"},{"line_number":78,"context_line":"            if d.name.startswith(INTERNAL_DEV_PREFIX):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_0cd0d31d","line":75,"in_reply_to":"da86d52c_a931ab5b","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            super(RouterNamespace, self).delete()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class SnatNamespace(Namespace):"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def __init__(self, router_id, agent_conf, driver, root_helper,"},{"line_number":97,"context_line":"                 use_ipv6\u003dNone):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_e99ba363","line":94,"updated":"2015-02-11 20:19:38.000000000","message":"I don\u0027t think this should live here.  Dvr stuff should not be in this file.  Sort of like dvr_fip_ns.py is in another file.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            super(RouterNamespace, self).delete()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class SnatNamespace(Namespace):"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def __init__(self, router_id, agent_conf, driver, root_helper,"},{"line_number":97,"context_line":"                 use_ipv6\u003dNone):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_6cff8f02","line":94,"in_reply_to":"da86d52c_e99ba363","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6443a1d73f2f5437508eb923af98dc88facb28c4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                # device is on default bridge"},{"line_number":73,"context_line":"                self.driver.unplug(d.name, namespace\u003dself.name,"},{"line_number":74,"context_line":"                                   prefix\u003dINTERNAL_DEV_PREFIX)"},{"line_number":75,"context_line":"            elif d.name.startswith(ROUTER_2_FIP_DEV_PREFIX):"},{"line_number":76,"context_line":"                ns_ip.del_veth(d.name)"},{"line_number":77,"context_line":"            elif d.name.startswith(EXTERNAL_DEV_PREFIX):"},{"line_number":78,"context_line":"                self.driver.unplug("}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_2618531d","line":75,"updated":"2015-02-12 19:25:35.000000000","message":"This is odd to me that the generic RouterNamespace has details introduced by the fip namespace.  However, I\u0027m not sure what the best way to deal with this is.","commit_id":"e80958abd83c7031e5839a1689cf2e30458aedb1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        name \u003d self._get_ns_name(router_id)"},{"line_number":61,"context_line":"        super(RouterNamespace, self).__init__("},{"line_number":62,"context_line":"            name, agent_conf, driver, root_helper, use_ipv6)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @staticmethod"},{"line_number":65,"context_line":"    def _get_ns_name(router_id):"},{"line_number":66,"context_line":"        return (NS_PREFIX + router_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_4877db3b","line":63,"updated":"2015-02-13 22:49:35.000000000","message":"Please get rid of this method.","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                 root_helper,"},{"line_number":35,"context_line":"                 agent_conf,"},{"line_number":36,"context_line":"                 interface_driver,"},{"line_number":37,"context_line":"                 process_monitor\u003dNone,"},{"line_number":38,"context_line":"                 use_ipv6\u003dFalse):"},{"line_number":39,"context_line":"        self.router_id \u003d router_id"},{"line_number":40,"context_line":"        self.ex_gw_port \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_114d503e","line":37,"updated":"2015-02-12 19:25:19.000000000","message":"I don\u0027t think a default makes sense here... Done.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":46,"context_line":"        # Invoke the setter for establishing initial SNAT action"},{"line_number":47,"context_line":"        self.router \u003d router"},{"line_number":48,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":49,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":50,"context_line":"        self.use_ipv6 \u003d use_ipv6"},{"line_number":51,"context_line":"        self.ns_name \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_e643d210","line":48,"updated":"2015-02-11 20:19:38.000000000","message":"This is now redundant with L59","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":46,"context_line":"        # Invoke the setter for establishing initial SNAT action"},{"line_number":47,"context_line":"        self.router \u003d router"},{"line_number":48,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":49,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":50,"context_line":"        self.use_ipv6 \u003d use_ipv6"},{"line_number":51,"context_line":"        self.ns_name \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_71c12c4d","line":48,"in_reply_to":"da86d52c_e643d210","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        # Invoke the setter for establishing initial SNAT action"},{"line_number":47,"context_line":"        self.router \u003d router"},{"line_number":48,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":49,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":50,"context_line":"        self.use_ipv6 \u003d use_ipv6"},{"line_number":51,"context_line":"        self.ns_name \u003d None"},{"line_number":52,"context_line":"        self._create_router_namespace(router_id, agent_conf, interface_driver,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_a6647ab9","line":49,"updated":"2015-02-11 20:19:38.000000000","message":"This is redundant with L45.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        # Invoke the setter for establishing initial SNAT action"},{"line_number":47,"context_line":"        self.router \u003d router"},{"line_number":48,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":49,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":50,"context_line":"        self.use_ipv6 \u003d use_ipv6"},{"line_number":51,"context_line":"        self.ns_name \u003d None"},{"line_number":52,"context_line":"        self._create_router_namespace(router_id, agent_conf, interface_driver,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_d1a9f890","line":49,"in_reply_to":"da86d52c_a6647ab9","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.router \u003d router"},{"line_number":48,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":49,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":50,"context_line":"        self.use_ipv6 \u003d use_ipv6"},{"line_number":51,"context_line":"        self.ns_name \u003d None"},{"line_number":52,"context_line":"        self._create_router_namespace(router_id, agent_conf, interface_driver,"},{"line_number":53,"context_line":"                                      root_helper, process_monitor, use_ipv6)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_26f7aad4","line":50,"updated":"2015-02-11 20:19:38.000000000","message":"Why is this line added?","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.router \u003d router"},{"line_number":48,"context_line":"        self.agent_conf \u003d agent_conf"},{"line_number":49,"context_line":"        self.root_helper \u003d root_helper"},{"line_number":50,"context_line":"        self.use_ipv6 \u003d use_ipv6"},{"line_number":51,"context_line":"        self.ns_name \u003d None"},{"line_number":52,"context_line":"        self._create_router_namespace(router_id, agent_conf, interface_driver,"},{"line_number":53,"context_line":"                                      root_helper, process_monitor, use_ipv6)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_11971049","line":50,"in_reply_to":"da86d52c_26f7aad4","updated":"2015-02-12 19:25:19.000000000","message":"dvr_router uses it now.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            ns \u003d namespaces.RouterNamespace(router_id, agent_conf, driver,"},{"line_number":67,"context_line":"                                            root_helper, process_monitor,"},{"line_number":68,"context_line":"                                            use_ipv6)"},{"line_number":69,"context_line":"            ns.create()"},{"line_number":70,"context_line":"            self.router_namespace \u003d ns"},{"line_number":71,"context_line":"            self.ns_name \u003d ns.name"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_e684b20c","line":69,"updated":"2015-02-11 20:19:38.000000000","message":"I\u0027m not sure yet about moving the creation of the namespace in to initializer of the router object.  I might need to think about this some more.  I\u0027m not quite ready to accept that creating a RouterInfo object should be tied with creating the namespace.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            ns \u003d namespaces.RouterNamespace(router_id, agent_conf, driver,"},{"line_number":67,"context_line":"                                            root_helper, process_monitor,"},{"line_number":68,"context_line":"                                            use_ipv6)"},{"line_number":69,"context_line":"            ns.create()"},{"line_number":70,"context_line":"            self.router_namespace \u003d ns"},{"line_number":71,"context_line":"            self.ns_name \u003d ns.name"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_e6e8fbe3","line":69,"in_reply_to":"da86d52c_e684b20c","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        return fip_statuses"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def delete(self):"},{"line_number":252,"context_line":"        self.router_namespace.delete()"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_4c311dec","line":252,"updated":"2015-02-11 20:19:38.000000000","message":"self.router_namespace may be None if agent_conf.use_namespaces is \n\nThis is actually the very reason I added the RootNamespace class.  To act as a stub to avoid having to add more conditional logic on the use_namespaces configuration.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        return fip_statuses"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def delete(self):"},{"line_number":252,"context_line":"        self.router_namespace.delete()"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_06e42f0b","line":252,"in_reply_to":"da86d52c_4c311dec","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4d077c35882fc491b648e083f5e1552175536cc3","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                 agent_conf,"},{"line_number":34,"context_line":"                 interface_driver,"},{"line_number":35,"context_line":"                 use_ipv6\u003dFalse,"},{"line_number":36,"context_line":"                 root_helper\u003dNone,"},{"line_number":37,"context_line":"                 ns_name\u003dNone):"},{"line_number":38,"context_line":"        self.router_id \u003d router_id"},{"line_number":39,"context_line":"        self.ex_gw_port \u003d None"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba7be1f8_973e6e28","side":"PARENT","line":36,"updated":"2015-02-20 00:49:23.000000000","message":"This shouldn\u0027t be removed from here because of a dependence on this by advanced services.  I believe otherwiseguy will take care of this eventually.","commit_id":"4c74026fe0ecdd2636e8ae482f722a5a8b9d47ad"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"532aa22bb027b109e4da7629e292feeeb3d0be68","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                 agent_conf,"},{"line_number":35,"context_line":"                 interface_driver,"},{"line_number":36,"context_line":"                 use_ipv6\u003dFalse,"},{"line_number":37,"context_line":"                 root_helper\u003dNone):"},{"line_number":38,"context_line":"        self.router_id \u003d router_id"},{"line_number":39,"context_line":"        self.ex_gw_port \u003d None"},{"line_number":40,"context_line":"        self._snat_enabled \u003d None"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_172ae28f","line":37,"updated":"2015-02-25 00:30:47.000000000","message":"Looks like the latest code doesn\u0027t have root_helper anymore.  We shouldn\u0027t add it back.  Take this out.","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dea83f44e6391a0770e6bc04490e810624574ed9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                 agent_conf,"},{"line_number":35,"context_line":"                 interface_driver,"},{"line_number":36,"context_line":"                 use_ipv6\u003dFalse,"},{"line_number":37,"context_line":"                 root_helper\u003dNone):"},{"line_number":38,"context_line":"        self.router_id \u003d router_id"},{"line_number":39,"context_line":"        self.ex_gw_port \u003d None"},{"line_number":40,"context_line":"        self._snat_enabled \u003d None"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba7be1f8_d9129f57","line":37,"in_reply_to":"ba7be1f8_172ae28f","updated":"2015-02-28 01:15:22.000000000","message":"Done","commit_id":"4ed590b3032ddbf71349d3bee2a1c04e500e1911"}],"neutron/common/exceptions.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2df6292e2c7ff6dcfcabea7cc2cf65808d81f11d","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        super(IpTablesApplyException, self).__init__()"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"class AbortSyncRouters(NeutronException):"},{"line_number":373,"context_line":"    message \u003d _(\"Aborting periodic_sync_routers_task due to an error\")"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_cdec4fbe","line":372,"updated":"2015-03-03 04:06:12.000000000","message":"i prefer to make this l3-agent internal.","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"002e82b066e88b71c4c605c7c3d1d5d46ad80969","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        super(IpTablesApplyException, self).__init__()"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"class AbortSyncRouters(NeutronException):"},{"line_number":373,"context_line":"    message \u003d _(\"Aborting periodic_sync_routers_task due to an error\")"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_108f5a2b","line":372,"in_reply_to":"ba7be1f8_cdec4fbe","updated":"2015-03-03 04:36:51.000000000","message":"I think the precedent has been set.  Though I agree with you, I think this change is consistent with existing code in where exceptions are defined.","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"}],"neutron/tests/common/agents/l3_agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":25,"context_line":"            observer.__class__(self) for observer in"},{"line_number":26,"context_line":"            self.event_observers.observers)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def get_ns_name(self, router_id):"},{"line_number":29,"context_line":"        ns_name \u003d super(TestL3NATAgent, self).get_ns_name(router_id)"},{"line_number":30,"context_line":"        return \"%s%s%s\" % (ns_name, self.NESTED_NAMESPACE_SEPARATOR, self.host)"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_86b776d7","side":"PARENT","line":28,"updated":"2015-02-11 20:19:38.000000000","message":"This was inlined.  I can see it is only used in two places, so I\u0027m okay with that.  It just seems tangential to this patch.","commit_id":"254522ab267591f05f647ddfeae6ea3fb6076c96"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        ns_name \u003d super(TestL3NATAgent, self).get_ns_name(router_id)"},{"line_number":30,"context_line":"        return \"%s%s%s\" % (ns_name, self.NESTED_NAMESPACE_SEPARATOR, self.host)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def get_router_id(self, ns_name):"},{"line_number":33,"context_line":"        # \u0027ns_name\u0027 should be in the format of: \u0027qrouter-\u003cid\u003e@\u003chost\u003e\u0027."},{"line_number":34,"context_line":"        return super(TestL3NATAgent, self).get_router_id("},{"line_number":35,"context_line":"            ns_name.split(self.NESTED_NAMESPACE_SEPARATOR)[0])"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_c6388ef0","side":"PARENT","line":32,"updated":"2015-02-11 20:19:38.000000000","message":"Why did this go away?\n\nUpdate: I guess it was never used but it was pinning down the NESTED_NAMESPACE_SEPARATOR after the above method was inlined.  So, if the inline above is justified then this makes sense.","commit_id":"254522ab267591f05f647ddfeae6ea3fb6076c96"}],"neutron/tests/functional/agent/test_l3_agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class L3AgentTestCase(L3AgentTestFramework):"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def test_observer_notifications_legacy_router(self):"},{"line_number":267,"context_line":"        self._test_observer_notifications(enable_ha\u003dFalse)"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_8605b67b","line":265,"updated":"2015-02-11 20:19:38.000000000","message":"Avoid gratuitous whitespace changes.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class L3AgentTestCase(L3AgentTestFramework):"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def test_observer_notifications_legacy_router(self):"},{"line_number":267,"context_line":"        self._test_observer_notifications(enable_ha\u003dFalse)"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_c67db76e","line":265,"in_reply_to":"da86d52c_8605b67b","updated":"2015-02-12 19:25:19.000000000","message":"Done","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3639a80308577f134fa6c3e6b68dfd42a02a7ce4","unresolved":false,"context_lines":[{"line_number":437,"context_line":"        ns_name \u003d \"%s%s%s\" % ("},{"line_number":438,"context_line":"                namespaces.RouterNamespace._get_ns_name(router_info[\u0027id\u0027]),"},{"line_number":439,"context_line":"                self.NESTED_NAMESPACE_SEPARATOR, self.agent.host)"},{"line_number":440,"context_line":"        mock.patch(\u0027neutron.agent.l3.namespaces.RouterNamespace._get_ns_name\u0027,"},{"line_number":441,"context_line":"                return_value\u003dns_name).start()"},{"line_number":442,"context_line":"        router1 \u003d self.manage_router(self.agent, router_info)"},{"line_number":443,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_29c66468","line":440,"updated":"2015-02-12 19:45:12.000000000","message":"Avoid this type of mock.patch.  Try to use mock.patch.object when you can.","commit_id":"e80958abd83c7031e5839a1689cf2e30458aedb1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3639a80308577f134fa6c3e6b68dfd42a02a7ce4","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        ns_name \u003d \"%s%s%s\" % ("},{"line_number":450,"context_line":"                namespaces.RouterNamespace._get_ns_name(router_info_2[\u0027id\u0027]),"},{"line_number":451,"context_line":"                self.NESTED_NAMESPACE_SEPARATOR, self.failover_agent.host)"},{"line_number":452,"context_line":"        mock.patch(\u0027neutron.agent.l3.namespaces.RouterNamespace._get_ns_name\u0027,"},{"line_number":453,"context_line":"                return_value\u003dns_name).start()"},{"line_number":454,"context_line":"        router2 \u003d self.manage_router(self.failover_agent, router_info_2)"},{"line_number":455,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_4998f874","line":452,"updated":"2015-02-12 19:45:12.000000000","message":"ditto","commit_id":"e80958abd83c7031e5839a1689cf2e30458aedb1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        br_int_2.add_port(veth2.name)"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def test_ha_router_failover(self):"},{"line_number":431,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dTrue)"},{"line_number":432,"context_line":"        ns_name \u003d \"%s%s%s\" % ("},{"line_number":433,"context_line":"                namespaces.RouterNamespace._get_ns_name(router_info[\u0027id\u0027]),"},{"line_number":434,"context_line":"                self.NESTED_NAMESPACE_SEPARATOR, self.agent.host)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_48aa7bd3","line":431,"updated":"2015-02-13 22:49:35.000000000","message":"Can\u0027t this be fixed up in tests/common/agents/l3_agent?","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":630,"context_line":"            ]"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"    def _assert_dvr_external_device(self, router):"},{"line_number":633,"context_line":"        external_port \u003d router.get_ex_gw_port()"},{"line_number":634,"context_line":"        snat_ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":635,"context_line":"            router.router_id)"},{"line_number":636,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_08808345","line":633,"updated":"2015-02-13 22:49:35.000000000","message":"You mean router.snat_namespace.name?","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":667,"context_line":"        if snat_namespace_should_not_exist:"},{"line_number":668,"context_line":"            self._assert_snat_namespace_does_not_exist(router)"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"    def _assert_dvr_snat_gateway(self, router):"},{"line_number":671,"context_line":"        namespace \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":672,"context_line":"            router.router_id)"},{"line_number":673,"context_line":"        external_port \u003d router.get_ex_gw_port()"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_08b403d0","line":670,"updated":"2015-02-13 22:49:35.000000000","message":"Ditto","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"02c937c9180ee910645f884a1a8274bcb0a63362","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        expected_gateway \u003d external_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":682,"context_line":"        self.assertEqual(expected_gateway, existing_gateway)"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"    def _assert_snat_namespace_does_not_exist(self, router):"},{"line_number":685,"context_line":"        namespace \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":686,"context_line":"            router.router_id)"},{"line_number":687,"context_line":"        self.assertFalse(self._namespace_exists(namespace))"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_28c8e755","line":684,"updated":"2015-02-13 22:49:35.000000000","message":"Ditto","commit_id":"553a6c52ca30db7b9f1b0344941152e215c39099"}],"neutron/tests/unit/agent/l3/test_dvr_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4747f4dfab0c3e66710ef1fcf900b938d063fabb","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _create_router(self, router, **kwargs):"},{"line_number":38,"context_line":"        agent_conf \u003d mock.Mock()"},{"line_number":39,"context_line":"        self.router_id \u003d _uuid()"},{"line_number":40,"context_line":"        with mock.patch.object(namespaces.Namespace, \u0027create\u0027):"},{"line_number":41,"context_line":"            return dvr_router.DvrRouter(mock.sentinel.myhost,"},{"line_number":42,"context_line":"                                        self.router_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_6917b345","line":39,"updated":"2015-02-11 20:19:38.000000000","message":"Aside:  I\u0027m starting to see that these agent/l3/test_*_router.py files have a similar pattern up here.  I\u0027m not ready to say that we need to share common code yet, just keeping an eye on it.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"}],"neutron/tests/unit/agent/l3/test_ha_router.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2df6292e2c7ff6dcfcabea7cc2cf65808d81f11d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        if not router:"},{"line_number":30,"context_line":"            router \u003d mock.MagicMock()"},{"line_number":31,"context_line":"        self.agent_conf \u003d mock.Mock()"},{"line_number":32,"context_line":"        # Deprecated"},{"line_number":33,"context_line":"        self.agent_conf.use_namespaces \u003d True"},{"line_number":34,"context_line":"        self.router_id \u003d _uuid()"},{"line_number":35,"context_line":"        return ha_router.HaRouter(self.router_id,"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_0d8027bf","line":32,"updated":"2015-03-03 04:06:12.000000000","message":"i\u0027m not sure what this comment is talking about.","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"}],"neutron/tests/unit/agent/l3/test_l3_router.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2df6292e2c7ff6dcfcabea7cc2cf65808d81f11d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        if not router:"},{"line_number":30,"context_line":"            router \u003d mock.MagicMock()"},{"line_number":31,"context_line":"        self.agent_conf \u003d mock.Mock()"},{"line_number":32,"context_line":"        # Deprecated"},{"line_number":33,"context_line":"        self.agent_conf.use_namespaces \u003d True"},{"line_number":34,"context_line":"        self.router_id \u003d _uuid()"},{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba7be1f8_4d869fdc","line":32,"updated":"2015-03-03 04:06:12.000000000","message":"i\u0027m not sure what this comment is talking about.","commit_id":"f810a1b19ed4ce23ac3fc3b9bcdbf28256a4d316"}],"neutron/tests/unit/agent/l3/test_router_info.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        with mock.patch(\u0027neutron.agent.l3.router_info.RouterInfo.\u0027"},{"line_number":78,"context_line":"            \u0027_create_router_namespace\u0027):"},{"line_number":79,"context_line":"            ri \u003d router_info.RouterInfo(_uuid(), {}, **self.ri_kwargs)"},{"line_number":80,"context_line":"            ri._create_router_namespace \u003d mock.MagicMock()"},{"line_number":81,"context_line":"            ri.router \u003d {}"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"            fake_old_routes \u003d []"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_71bdacb0","line":80,"updated":"2015-02-12 19:25:19.000000000","message":"This is redundant with the mock.patch on L77 I think... Done.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"}],"neutron/tests/unit/test_l3_agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"41479c51f27d459a99aee5ecc53204c38e31d7ef","unresolved":false,"context_lines":[{"line_number":1670,"context_line":"                                                        \u0027-bar\u0027)"},{"line_number":1671,"context_line":"        self.mock_ip.del_veth.assert_called_once_with(\u0027rfp-aaaa\u0027)"},{"line_number":1672,"context_line":""},{"line_number":1673,"context_line":"    def test_destroy_router_namespace_skips_ns_removal(self):"},{"line_number":1674,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":1675,"context_line":"        ns \u003d namespaces.RouterNamespace(\u0027bar\u0027, self.conf, agent.driver,"},{"line_number":1676,"context_line":"                                        agent.root_helper, agent.use_ipv6)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_4e7cb8b5","line":1673,"updated":"2015-01-26 20:01:11.000000000","message":"Could we create a new test module for namespaces and start cleaning up this file a bit?","commit_id":"1173c5424501b9f4f7759c61dffd37dd93ca2fbc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    def test_router_info_create(self):"},{"line_number":325,"context_line":"        id \u003d _uuid()"},{"line_number":326,"context_line":"        ri \u003d l3router.RouterInfo(id, {}, process_monitor\u003dNone,"},{"line_number":327,"context_line":"                                 **self.ri_kwargs)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        self.assertTrue(ri.ns_name.endswith(id))"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_52b7c639","line":326,"updated":"2015-02-12 19:25:19.000000000","message":"A lot of this passing around None for process_monitor could be handled by adding process_monitor to self.ri_kwargs above... Done.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f7e38ef5815aaa24cc824ef16629924329c24a37","unresolved":false,"context_lines":[{"line_number":1622,"context_line":"        pm \u003d self.external_process.return_value"},{"line_number":1623,"context_line":"        pm.reset_mock()"},{"line_number":1624,"context_line":""},{"line_number":1625,"context_line":"        with mock.patch(\u0027neutron.agent.l3.namespaces.\u0027"},{"line_number":1626,"context_line":"            \u0027RouterNamespace.delete\u0027) as router_ns_mock:"},{"line_number":1627,"context_line":"            with mock.patch(\u0027neutron.agent.l3.namespaces.\u0027"},{"line_number":1628,"context_line":"                \u0027SnatNamespace.delete\u0027) as snat_ns_mock:"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_32ced25a","line":1625,"updated":"2015-02-12 19:25:19.000000000","message":"Don\u0027t patch like this with strings.  Use mock.patch.object.  Also, a decorator would probably be cleaner... Done.","commit_id":"201de52f2dd27b2ff32f61767ec4e548a4ec8fa6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6443a1d73f2f5437508eb923af98dc88facb28c4","unresolved":false,"context_lines":[{"line_number":1557,"context_line":""},{"line_number":1558,"context_line":"    @mock.patch.object(namespaces.RouterNamespace, \u0027delete\u0027)"},{"line_number":1559,"context_line":"    @mock.patch.object(dvr_snat_ns.SnatNamespace, \u0027delete\u0027)"},{"line_number":1560,"context_line":"    def _cleanup_namespace_test(self,"},{"line_number":1561,"context_line":"                                stale_namespace_list,"},{"line_number":1562,"context_line":"                                router_list,"},{"line_number":1563,"context_line":"                                other_namespaces,"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_66a32bb2","line":1560,"updated":"2015-02-12 19:25:35.000000000","message":"I\u0027d like to move tests for the namespace manager to a new test case just for that module.  That would help clean out this huge test case for the l3 agent.  Are there other tests which could be moved?","commit_id":"e80958abd83c7031e5839a1689cf2e30458aedb1"}]}
