)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b67461f95ceab8ac4a8430baa867a3b70c3eff25","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     adolfo duarte \u003cadolfo.duarte@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-20 16:30:17 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added test_dvr_router_lifecycle to cover dvr"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Several additions were necessary to support testing the lifecycle of a"},{"line_number":10,"context_line":"dvr router. Added new function _dvr_router_lifecycle and necessary"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1a930d6b_d4caad6d","line":7,"updated":"2015-01-21 01:39:36.000000000","message":"Commit messages are for explaining the purpose of a change in the same way that a comment should document the \u0027why\u0027 of code that is otherwise not self-explanatory.  Most of this message is describing the \u0027how\u0027 rather than the \u0027why\u0027, and I would encourage you to include only details that can\u0027t be determined by casual inspection, e.g.\n\nAdd functional lifecycle tests for dvr\n\nThis change adds functional testing for the lifecycle of a distributed virtual router.  Previously, coverage was limited to unit tests that did not actually interact with the host.","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"}],"neutron/tests/functional/agent/test_l3_agent.py":[{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"43ccf2e5531720e288605e0bb567c5bf06a1f463","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        self._assert_router_does_not_exist(router)"},{"line_number":355,"context_line":"        if enable_ha:"},{"line_number":356,"context_line":"            self.assertFalse(router.keepalived_manager.process.active)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def _assert_internal_devices(self, router):"},{"line_number":359,"context_line":"        internal_devices \u003d router.router[l3_constants.INTERFACE_KEY]"},{"line_number":360,"context_line":"        self.assertTrue(len(internal_devices))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_1ce9cfe2","line":357,"updated":"2014-12-04 21:36:45.000000000","message":"Looks like you can share alot of the code between _router_lifecycle() and _dvr_router_lifecycle(). L285-L314 and L328-L357 look essentially the same.","commit_id":"6e1a2e9c563df15737c4486bd440c12ede8a22d2"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"3151ac6fe504f86922b21659b8aa9026e25a789d","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        self._assert_router_does_not_exist(router)"},{"line_number":355,"context_line":"        if enable_ha:"},{"line_number":356,"context_line":"            self.assertFalse(router.keepalived_manager.process.active)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def _assert_internal_devices(self, router):"},{"line_number":359,"context_line":"        internal_devices \u003d router.router[l3_constants.INTERFACE_KEY]"},{"line_number":360,"context_line":"        self.assertTrue(len(internal_devices))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_70e4b7df","line":357,"in_reply_to":"5a890539_1ce9cfe2","updated":"2014-12-04 22:11:40.000000000","message":"Yes originally I went down that path, but it turns out that I have to make too many changest to _rotuer_lifecycle().  as well as some other files (test_l3_agnet.py under unit test).  _router_lifecycle() does not provide for a \"distributed\" parameter, having to add it could cause some problems.. \nI am still on the fence on which way. I tried it the current way because it touched less code from other tests. I did not want to break the tests that were already there.","commit_id":"6e1a2e9c563df15737c4486bd440c12ede8a22d2"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"43ccf2e5531720e288605e0bb567c5bf06a1f463","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":375,"context_line":"            external_port, self.agent.get_external_device_name,"},{"line_number":376,"context_line":"            snat_ns_name))"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def _assert_gateway(self, router):"},{"line_number":379,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":380,"context_line":"        external_device_name \u003d self.agent.get_external_device_name("}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_dc2027b2","line":377,"updated":"2014-12-04 21:36:45.000000000","message":"Same here.","commit_id":"6e1a2e9c563df15737c4486bd440c12ede8a22d2"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"3151ac6fe504f86922b21659b8aa9026e25a789d","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":375,"context_line":"            external_port, self.agent.get_external_device_name,"},{"line_number":376,"context_line":"            snat_ns_name))"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def _assert_gateway(self, router):"},{"line_number":379,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":380,"context_line":"        external_device_name \u003d self.agent.get_external_device_name("}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_d021ebfc","line":377,"in_reply_to":"5a890539_dc2027b2","updated":"2014-12-04 22:11:40.000000000","message":"Note the namespace. in order to make original _assert_external_device() work for distributed I would have to pass in a \"distributed\u003dTrue\" parameter and add a couple of if then statements. In all I would add/change more lines than the new lines I introduced by simply creating a new function, since both functions are completey different in what they check.  putting the logic into _assert_external_device() to make it handle distributed\u003dTrue just makes the code comboluted and hard to read.","commit_id":"6e1a2e9c563df15737c4486bd440c12ede8a22d2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a99b3fff163b807524baffa25719a80657ce780a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        router[\u0027distributed\u0027] \u003d distributed"},{"line_number":92,"context_line":"        router[\u0027gw_port_host\u0027] \u003d self.agent.conf.host"},{"line_number":93,"context_line":"        router[\u0027gw_port\u0027][\u0027binding:host_id\u0027] \u003d self.agent.conf.host"},{"line_number":94,"context_line":"        router[\u0027_floatingips\u0027][0][\u0027floating_network_id\u0027] \\"},{"line_number":95,"context_line":"            \u003d router[\u0027gw_port\u0027][\u0027network_id\u0027]"},{"line_number":96,"context_line":"        router[\u0027_floatingips\u0027][0][\u0027host\u0027] \u003d self.agent.conf.host"},{"line_number":97,"context_line":"        router[\u0027_floatingips\u0027][0][\u0027port_id\u0027] \u003d int_ports[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_87d39ad4","line":94,"updated":"2014-12-05 07:37:20.000000000","message":"we use () instead of \\ to break lines, like so:\n\n  router[\u0027_floatingips\u0027][0][\u0027floating_network_id\u0027] \u003d (\n      router[\u0027gw_port\u0027][\u0027network_id\u0027])","commit_id":"37fa24b53f6a6bcf030a119d8992c963be653d54"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a99b3fff163b807524baffa25719a80657ce780a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        if enable_snat:"},{"line_number":101,"context_line":"            snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":102,"context_line":"            if len(snat_port_list) \u003c 1:"},{"line_number":103,"context_line":"                if len(int_ports) \u003e 0:"},{"line_number":104,"context_line":"                    # We first get values from internal port"},{"line_number":105,"context_line":"                    snat_subnet_id \u003d int_ports[0][\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":106,"context_line":"                    snat_cidr \u003d int_ports[0][\u0027subnet\u0027][\u0027cidr\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2792e6fc","line":103,"updated":"2014-12-05 07:37:20.000000000","message":"you could do:\n\n  if not len(snat_port_list) and len(int_port):\n    ..","commit_id":"37fa24b53f6a6bcf030a119d8992c963be653d54"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a99b3fff163b807524baffa25719a80657ce780a","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                            \u0027ip_address\u0027: snat_ip}],"},{"line_number":125,"context_line":"                            \u0027id\u0027: _uuid(),"},{"line_number":126,"context_line":"                            \u0027device_id\u0027: _uuid()}"},{"line_number":127,"context_line":"                                                                 ]"},{"line_number":128,"context_line":"        return router"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def generate_router_info(self, enable_ha):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_078dead3","line":127,"updated":"2014-12-05 07:37:20.000000000","message":"this bracket should be indented all the way back to align with router on line 115, like so:\n\n\n  router[...] \u003d [\n    ..\n  ]","commit_id":"37fa24b53f6a6bcf030a119d8992c963be653d54"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a99b3fff163b807524baffa25719a80657ce780a","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        # before the l3_agent will create it."},{"line_number":293,"context_line":"        # (Adolfo Duarte) I am not sure if this will affect non dvr"},{"line_number":294,"context_line":"        # tests. Perhaps this should be in an if/else statement"},{"line_number":295,"context_line":"        l3_agent.L3PluginApi.return_value.get_agent_gateway_port.return_value\\"},{"line_number":296,"context_line":"            \u003d router_info[\u0027gw_port\u0027]"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_27b9067d","line":295,"updated":"2014-12-05 07:37:20.000000000","message":"ditto","commit_id":"37fa24b53f6a6bcf030a119d8992c963be653d54"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3eb2df39cb614184c851a98c101ece83ae05d123","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        int_ports \u003d router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":91,"context_line":"        router[\u0027distributed\u0027] \u003d distributed"},{"line_number":92,"context_line":"        router[\u0027gw_port_host\u0027] \u003d self.agent.conf.host"},{"line_number":93,"context_line":"        router[\u0027gw_port\u0027][\u0027binding:host_id\u0027] \u003d self.agent.conf.host"},{"line_number":94,"context_line":"        router[\u0027_floatingips\u0027][0][\u0027floating_network_id\u0027] \u003d ("},{"line_number":95,"context_line":"            router[\u0027gw_port\u0027][\u0027network_id\u0027])"},{"line_number":96,"context_line":"        router[\u0027_floatingips\u0027][0][\u0027host\u0027] \u003d self.agent.conf.host"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_f7b74ed6","line":93,"updated":"2014-12-10 08:52:10.000000000","message":"This code seems very repetitive. How about:\n\n floating_ip \u003d router[\u0027_floatingips\u0027][0]\n floating_ip[\u0027host\u0027] \u003d self.agent.conf.host\n floating_ip[\u0027port_id\u0027] \u003d int_ports[0][\u0027id\u0027]\n # ...","commit_id":"6c71da6d847a37095648f13a5cc3765f1e522412"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3eb2df39cb614184c851a98c101ece83ae05d123","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        router[\u0027_floatingips\u0027][0][\u0027port_id\u0027] \u003d int_ports[0][\u0027id\u0027]"},{"line_number":98,"context_line":"        router[\u0027_floatingips\u0027][0][\u0027status\u0027] \u003d \u0027ACTIVE\u0027"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if enable_snat:"},{"line_number":101,"context_line":"            snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":102,"context_line":"            if not len(snat_port_list) and len(int_ports):"},{"line_number":103,"context_line":"                # We first get values from internal port"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_d7e1729b","line":100,"updated":"2014-12-10 08:52:10.000000000","message":"We could check what happens if enable_snat is False instead, and this will decrease the indentation level of the next block by one. i.e.:\n\n if not enable_snat:\n     return router\n\n snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])\n # ....\n return router\n\nThis has the tradeoff of having 2 return statements in this function, but it will be easier to fit in the 80-chars-per-line rule and will look better IMO.","commit_id":"6c71da6d847a37095648f13a5cc3765f1e522412"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3eb2df39cb614184c851a98c101ece83ae05d123","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        if enable_snat:"},{"line_number":101,"context_line":"            snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":102,"context_line":"            if not len(snat_port_list) and len(int_ports):"},{"line_number":103,"context_line":"                # We first get values from internal port"},{"line_number":104,"context_line":"                snat_subnet_id \u003d int_ports[0][\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":105,"context_line":"                snat_cidr \u003d int_ports[0][\u0027subnet\u0027][\u0027cidr\u0027]"},{"line_number":106,"context_line":"                snat_gw \u003d int_ports[0][\u0027subnet\u0027][\u0027gateway_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_97cd2a60","line":103,"updated":"2014-12-10 08:52:10.000000000","message":"How about:\n\n fixed_ip \u003d int_ports[0][\u0027fixed_ips\u0027][0]\n subnet \u003d int_ports[0][\u0027subnet\u0027]\n \n cidr \u003d subnet[\u0027cidr\u0027]\n gateway \u003d subnet[\u0027gateway_ip\u0027]\n port_ip \u003d fixed_ip[\u0027ip_address\u0027]\n #...\n\nLooking at the code block in L114, maybe all of these temporary variables can be removed and the keys can be referenced straight from the dict. This will look better if we use my proposed fixed_ip, subnet variables, i.e.:\n\n router[l3_constants.SNAT_ROUTER_INTF_KEY] \u003d [\n     {\u0027subnet\u0027:\n         {\u0027cidr\u0027: subnet[\u0027cidr\u0027],\n #...","commit_id":"6c71da6d847a37095648f13a5cc3765f1e522412"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3eb2df39cb614184c851a98c101ece83ae05d123","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                snat_gw \u003d int_ports[0][\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":107,"context_line":"                snat_network_id \u003d int_ports[0][\u0027network_id\u0027]"},{"line_number":108,"context_line":"                port_ip \u003d int_ports[0][\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":109,"context_line":"                # we pick an ip adress ending in 9(is this safe?)"},{"line_number":110,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":111,"context_line":"                # And add the info to router as its snat_port"},{"line_number":112,"context_line":"                # Could do this in one line but makes it hard"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_973b6a37","line":109,"updated":"2014-12-10 08:52:10.000000000","message":"Is it safe? (a real question which needs answering, I think)","commit_id":"6c71da6d847a37095648f13a5cc3765f1e522412"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3eb2df39cb614184c851a98c101ece83ae05d123","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                # we pick an ip adress ending in 9(is this safe?)"},{"line_number":110,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":111,"context_line":"                # And add the info to router as its snat_port"},{"line_number":112,"context_line":"                # Could do this in one line but makes it hard"},{"line_number":113,"context_line":"                # to read"},{"line_number":114,"context_line":"                router[l3_constants.SNAT_ROUTER_INTF_KEY] \u003d ["},{"line_number":115,"context_line":"                    {\u0027subnet\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_17177aa4","line":112,"updated":"2014-12-10 08:52:10.000000000","message":"nit: Could -\u003e could","commit_id":"6c71da6d847a37095648f13a5cc3765f1e522412"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3eb2df39cb614184c851a98c101ece83ae05d123","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        external_device \u003d ip_lib.IPDevice(external_device_name,"},{"line_number":366,"context_line":"                                          self.root_helper,"},{"line_number":367,"context_line":"                                          router.ns_name)"},{"line_number":368,"context_line":"        existing_gateway \u003d ("},{"line_number":369,"context_line":"            external_device.route.get_gateway().get(\u0027gateway\u0027))"},{"line_number":370,"context_line":"        expected_gateway \u003d external_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":371,"context_line":"        self.assertEqual(expected_gateway, existing_gateway)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_5749028a","line":368,"updated":"2014-12-10 08:52:10.000000000","message":"Lines 368-371 duplicate the ones at lines 381-384. I think we can create some kind of helper function which both _assert_gateway and _assert_dvr_gateway use to do this assertion.","commit_id":"6c71da6d847a37095648f13a5cc3765f1e522412"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"bbf25f6594c87f0c718367abf7d352f56d802265","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        return agent"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def generate_dvr_router_info(self, enable_ha\u003dFalse, distributed\u003dFalse,"},{"line_number":88,"context_line":"                                 enable_snat\u003dFalse):"},{"line_number":89,"context_line":"        router \u003d test_l3_agent.prepare_router_data(enable_snat\u003dTrue,"},{"line_number":90,"context_line":"                                                   enable_floating_ip\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_86c45760","line":87,"updated":"2014-12-16 20:00:52.000000000","message":"any reason particular reason why didn\u0027t extend method generate_router_info the same way you extended method _router_lifecycle to add the dvr specific logic?","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        return agent"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def generate_dvr_router_info(self, enable_ha\u003dFalse, distributed\u003dFalse,"},{"line_number":88,"context_line":"                                 enable_snat\u003dFalse):"},{"line_number":89,"context_line":"        router \u003d test_l3_agent.prepare_router_data(enable_snat\u003dTrue,"},{"line_number":90,"context_line":"                                                   enable_floating_ip\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_49f4a9f0","line":87,"in_reply_to":"3a961159_86c45760","updated":"2015-01-07 18:10:43.000000000","message":"It could be done that way. But Maru and Carl have pointed out that there is a \"conditional hell\" emerging. So perhaps its best to go the other way and actually split method_router_lifecycle like generate_dvr_router_info. I\u0027ll investigate to see what each aproach looks like","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"bbf25f6594c87f0c718367abf7d352f56d802265","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        return agent"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def generate_dvr_router_info(self, enable_ha\u003dFalse, distributed\u003dFalse,"},{"line_number":88,"context_line":"                                 enable_snat\u003dFalse):"},{"line_number":89,"context_line":"        router \u003d test_l3_agent.prepare_router_data(enable_snat\u003dTrue,"},{"line_number":90,"context_line":"                                                   enable_floating_ip\u003dTrue,"},{"line_number":91,"context_line":"                                                   enable_ha\u003denable_ha)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_e6afdb7b","line":88,"updated":"2014-12-16 20:00:52.000000000","message":"this does not look right, enable_snat is a bool, but you pass the agent mode at one point.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        return agent"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def generate_dvr_router_info(self, enable_ha\u003dFalse, distributed\u003dFalse,"},{"line_number":88,"context_line":"                                 enable_snat\u003dFalse):"},{"line_number":89,"context_line":"        router \u003d test_l3_agent.prepare_router_data(enable_snat\u003dTrue,"},{"line_number":90,"context_line":"                                                   enable_floating_ip\u003dTrue,"},{"line_number":91,"context_line":"                                                   enable_ha\u003denable_ha)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_49cbc9a3","line":88,"in_reply_to":"3a961159_e6afdb7b","updated":"2015-01-07 18:10:43.000000000","message":"eanble_snat and agent_mode are two different settings. \nenable_snat is a bool True or False, used by older test code (non-dvr).\nagent_mode is a value which applies to dvr agents. But you are correct, perhaps I can derive the value of agent_mode from the value of eanble_snat.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"019e86959909a7e9d832f19e84a2ea96c41cd2ed","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def generate_dvr_router_info(self, enable_ha\u003dFalse, distributed\u003dFalse,"},{"line_number":88,"context_line":"                                 enable_snat\u003dFalse):"},{"line_number":89,"context_line":"        router \u003d test_l3_agent.prepare_router_data(enable_snat\u003dTrue,"},{"line_number":90,"context_line":"                                                   enable_floating_ip\u003dTrue,"},{"line_number":91,"context_line":"                                                   enable_ha\u003denable_ha)"},{"line_number":92,"context_line":"        int_ports \u003d router.get(l3_constants.INTERFACE_KEY, [])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_4c9bf017","line":89,"updated":"2014-12-21 07:28:52.000000000","message":"I\u0027m confused as to why enable_snat is passed as a parameter to this method but isn\u0027t used here.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def generate_dvr_router_info(self, enable_ha\u003dFalse, distributed\u003dFalse,"},{"line_number":88,"context_line":"                                 enable_snat\u003dFalse):"},{"line_number":89,"context_line":"        router \u003d test_l3_agent.prepare_router_data(enable_snat\u003dTrue,"},{"line_number":90,"context_line":"                                                   enable_floating_ip\u003dTrue,"},{"line_number":91,"context_line":"                                                   enable_ha\u003denable_ha)"},{"line_number":92,"context_line":"        int_ports \u003d router.get(l3_constants.INTERFACE_KEY, [])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_69e885e2","line":89,"in_reply_to":"3a961159_4c9bf017","updated":"2015-01-07 18:10:43.000000000","message":"this was a copy and paste from generate_router_info (pre-dvr test code)\nPerhaps that also needs to be corrected, but I have not worked on that code, so i assume there is a good reason why the call is done that way, but I will change it in generate_dvr_router_info, to pass those values in that way to allow for more flexibility later on.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"019e86959909a7e9d832f19e84a2ea96c41cd2ed","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            return router"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":106,"context_line":"        if not len(snat_port_list) and len(int_ports):"},{"line_number":107,"context_line":"            # We first get values from internal port"},{"line_number":108,"context_line":"            port \u003d int_ports[0]"},{"line_number":109,"context_line":"            fixed_ip \u003d port[\u0027fixed_ips\u0027][0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_2c96a4f0","line":106,"updated":"2014-12-21 07:28:52.000000000","message":"You can use implicit boolean conversion, e.g.\n\n(not snat_port_list and int_ports) \u003d\u003d (not len(snat_port_list) and len(int_ports))","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            return router"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":106,"context_line":"        if not len(snat_port_list) and len(int_ports):"},{"line_number":107,"context_line":"            # We first get values from internal port"},{"line_number":108,"context_line":"            port \u003d int_ports[0]"},{"line_number":109,"context_line":"            fixed_ip \u003d port[\u0027fixed_ips\u0027][0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_e9a2b5ac","line":106,"in_reply_to":"3a961159_2c96a4f0","updated":"2015-01-07 18:10:43.000000000","message":"Thank you will do","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"019e86959909a7e9d832f19e84a2ea96c41cd2ed","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            fixed_ip \u003d port[\u0027fixed_ips\u0027][0]"},{"line_number":110,"context_line":"            snat_subnet \u003d port[\u0027subnet\u0027]"},{"line_number":111,"context_line":"            port_ip \u003d fixed_ip[\u0027ip_address\u0027]"},{"line_number":112,"context_line":"            # We have to pick an ip address which is not the same as port"},{"line_number":113,"context_line":"            if port_ip[-1] !\u003d \"9\":"},{"line_number":114,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":115,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_6c9c2c0f","line":112,"updated":"2014-12-21 07:28:52.000000000","message":"This comment suggests a helper method that derives the snat ip from the port ip, e.g.\n\n snat_ip \u003d get_snat_ip(port_ip)","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            fixed_ip \u003d port[\u0027fixed_ips\u0027][0]"},{"line_number":110,"context_line":"            snat_subnet \u003d port[\u0027subnet\u0027]"},{"line_number":111,"context_line":"            port_ip \u003d fixed_ip[\u0027ip_address\u0027]"},{"line_number":112,"context_line":"            # We have to pick an ip address which is not the same as port"},{"line_number":113,"context_line":"            if port_ip[-1] !\u003d \"9\":"},{"line_number":114,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":115,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_6996c54d","line":112,"in_reply_to":"3a961159_6c9c2c0f","updated":"2015-01-07 18:10:43.000000000","message":"Good idea. Will do, thank you.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"bbf25f6594c87f0c718367abf7d352f56d802265","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    def test_dvr_router_lifecycle(self):"},{"line_number":248,"context_line":"        self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027"},{"line_number":249,"context_line":"        self._router_lifecycle(enable_ha\u003dFalse, distributed\u003dTrue,"},{"line_number":250,"context_line":"                               agent_mode\u003d\u0027dvr_snat\u0027)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def test_keepalived_configuration(self):"},{"line_number":253,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_06b067f3","line":250,"updated":"2014-12-16 20:00:52.000000000","message":"you could pass self.agent.conf.agent_mode here to avoid the dup, but the last arg is supposed to be enable_snat, no?","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    def test_dvr_router_lifecycle(self):"},{"line_number":248,"context_line":"        self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027"},{"line_number":249,"context_line":"        self._router_lifecycle(enable_ha\u003dFalse, distributed\u003dTrue,"},{"line_number":250,"context_line":"                               agent_mode\u003d\u0027dvr_snat\u0027)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def test_keepalived_configuration(self):"},{"line_number":253,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_c9d339ff","line":250,"in_reply_to":"3a961159_06b067f3","updated":"2015-01-07 18:10:43.000000000","message":"The last value is agent_mode, enable_snat does not appear until a few calls  down the stack inside \"generate_dvr_rotuer_info\" but it is a good idea to pull that variable all the way up to this leve to expose it to allow for easily creating new tests later on. I don\u0027t really know why it is burried (enabel_snat) down in generate_router_info and generate_dvr_router_info. I have not made any changes to generate_router_info so I won\u0027t touch that but I will make the necessary changes in generate_dvr_router_info expose that setting to any caller.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"bbf25f6594c87f0c718367abf7d352f56d802265","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        if distributed:"},{"line_number":287,"context_line":"            router_info \u003d self.generate_dvr_router_info(enable_ha,"},{"line_number":288,"context_line":"                                                        distributed,"},{"line_number":289,"context_line":"                                                        agent_mode)"},{"line_number":290,"context_line":"            # We need to mock the get_agent_gateway_port return value"},{"line_number":291,"context_line":"            # since the whole L3PluginApi is mocked and we need the port"},{"line_number":292,"context_line":"            # before the l3_agent will create it."}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_86c0d72b","line":289,"updated":"2014-12-16 20:00:52.000000000","message":"agent_mode is None, but it is supposed to be enable_snat","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        if distributed:"},{"line_number":287,"context_line":"            router_info \u003d self.generate_dvr_router_info(enable_ha,"},{"line_number":288,"context_line":"                                                        distributed,"},{"line_number":289,"context_line":"                                                        agent_mode)"},{"line_number":290,"context_line":"            # We need to mock the get_agent_gateway_port return value"},{"line_number":291,"context_line":"            # since the whole L3PluginApi is mocked and we need the port"},{"line_number":292,"context_line":"            # before the l3_agent will create it."}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_694085a5","line":289,"in_reply_to":"3a961159_86c0d72b","updated":"2015-01-07 18:10:43.000000000","message":"again, agent_mode and enagle_snat are two different variables, I\u0027ll look on how to merge the two if possible.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"019e86959909a7e9d832f19e84a2ea96c41cd2ed","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _assert_external_dvr_device(self, router):"},{"line_number":362,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":363,"context_line":"        snat_ns_name \u003d \"snat-\" + str(router.router_id)"},{"line_number":364,"context_line":"        self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":365,"context_line":"            external_port, self.agent.get_external_device_name,"},{"line_number":366,"context_line":"            snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_ac89b4cb","line":363,"updated":"2014-12-21 07:28:52.000000000","message":"Is there a reason to compose the namespace name rather than using get_snat_ns_name() here and on line 384?","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _assert_external_dvr_device(self, router):"},{"line_number":362,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":363,"context_line":"        snat_ns_name \u003d \"snat-\" + str(router.router_id)"},{"line_number":364,"context_line":"        self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":365,"context_line":"            external_port, self.agent.get_external_device_name,"},{"line_number":366,"context_line":"            snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_e91395b5","line":363,"in_reply_to":"3a961159_ac89b4cb","updated":"2015-01-07 18:10:43.000000000","message":"Good catch. I will investigate how to do this.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"019e86959909a7e9d832f19e84a2ea96c41cd2ed","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        # Check that the fg-\u003cport-id\u003e (floatingip_agent_gateway)"},{"line_number":402,"context_line":"        # is created with the ip address of the external gateway port"},{"line_number":403,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":404,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":405,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":406,"context_line":"        fip_ns_name \u003d \"fip-\" + str(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":407,"context_line":"        # Check that the fg port is created correctly"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_ccffe032","line":404,"updated":"2014-12-21 07:28:52.000000000","message":"len() is unnecessary in validating that a list is non-empty (see: implicit boolean conversion).","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        # Check that the fg-\u003cport-id\u003e (floatingip_agent_gateway)"},{"line_number":402,"context_line":"        # is created with the ip address of the external gateway port"},{"line_number":403,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":404,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":405,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":406,"context_line":"        fip_ns_name \u003d \"fip-\" + str(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":407,"context_line":"        # Check that the fg port is created correctly"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_a91d0dc0","line":404,"in_reply_to":"3a961159_ccffe032","updated":"2015-01-07 18:10:43.000000000","message":"will do","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"019e86959909a7e9d832f19e84a2ea96c41cd2ed","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":404,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":405,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":406,"context_line":"        fip_ns_name \u003d \"fip-\" + str(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":407,"context_line":"        # Check that the fg port is created correctly"},{"line_number":408,"context_line":"        self.assertTrue(ip_lib.device_exists_with_ip_mac("},{"line_number":409,"context_line":"            self.agent.get_fip_ext_device_name(external_port[\u0027id\u0027]),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_ec8f3ccb","line":406,"updated":"2014-12-21 07:28:52.000000000","message":"Is there a reason to compose the namespace name rather than using get_fip_ns_name()?","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"0bb0ac22e74af55af1464f7cd61fd6f22cd237fa","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":404,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":405,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":406,"context_line":"        fip_ns_name \u003d \"fip-\" + str(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":407,"context_line":"        # Check that the fg port is created correctly"},{"line_number":408,"context_line":"        self.assertTrue(ip_lib.device_exists_with_ip_mac("},{"line_number":409,"context_line":"            self.agent.get_fip_ext_device_name(external_port[\u0027id\u0027]),"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_6927a512","line":406,"in_reply_to":"3a961159_ec8f3ccb","updated":"2015-01-07 18:10:43.000000000","message":"again good catch. Will investigate.","commit_id":"fa90c65dd7948629d34d58704d0c800d61bea66e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8fd8d5192387cad8955721cc33e738337486eb2c","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    def test_ha_router_lifecycle(self):"},{"line_number":285,"context_line":"        self._router_lifecycle(enable_ha\u003dTrue)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_dvr_router_lifecycle(self):"},{"line_number":288,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":289,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_491cd466","line":287,"updated":"2015-01-15 03:40:16.000000000","message":"it would be clearer if this test method had a name more intuitive, or a docstring that expressed what you\u0027re testing exactly. As far as I can see, for instance:\n\ntest_dvr_router_lifecycle_with_fip_only","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"de7aea3ff17709bf91679468069a7b8627903db0","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    def test_ha_router_lifecycle(self):"},{"line_number":285,"context_line":"        self._router_lifecycle(enable_ha\u003dTrue)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_dvr_router_lifecycle(self):"},{"line_number":288,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":289,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_543a84cd","line":287,"in_reply_to":"3a961159_491cd466","updated":"2015-01-15 21:30:09.000000000","message":"changed name and added docstring","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8fd8d5192387cad8955721cc33e738337486eb2c","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":289,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def test_dvr_snat_router_lifecycle(self):"},{"line_number":292,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dTrue,"},{"line_number":293,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_094d6c72","line":291,"updated":"2015-01-15 03:40:16.000000000","message":"this test overrides the previous one, so you run it once, this needs a different name. Please follow my suggestion above.","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"de7aea3ff17709bf91679468069a7b8627903db0","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":289,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def test_dvr_snat_router_lifecycle(self):"},{"line_number":292,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dTrue,"},{"line_number":293,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_5e78e4f7","line":291,"in_reply_to":"3a961159_094d6c72","updated":"2015-01-15 21:30:09.000000000","message":"I\u0027ll change names and add doc strings to make clearer.\nNote the differece between the two. one is with and on is without snat\ntest_dvr_router_lifecycle_without_ha_without_snat_with_fips\ntest_dvr_router_lifecycle_without_ha_with_snat_with_fips","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8fd8d5192387cad8955721cc33e738337486eb2c","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        # The value of agent_mode can be dvr, dvr_snat, or legacy"},{"line_number":371,"context_line":"        # since by definition we are in dvr (distributed \u003d true)"},{"line_number":372,"context_line":"        # we only care about dvr_snat, or dvr"},{"line_number":373,"context_line":"        if enable_snat:"},{"line_number":374,"context_line":"            self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027"},{"line_number":375,"context_line":"        else:"},{"line_number":376,"context_line":"            self.agent.conf.agent_mode \u003d \u0027dvr\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_e9b10045","line":373,"updated":"2015-01-15 03:40:16.000000000","message":"just a suggestion:\n\n self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027 if enable_snat else \u0027dvr\u0027\n\nit\u0027s a lot more compact and does the same thing.","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"de7aea3ff17709bf91679468069a7b8627903db0","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        # The value of agent_mode can be dvr, dvr_snat, or legacy"},{"line_number":371,"context_line":"        # since by definition we are in dvr (distributed \u003d true)"},{"line_number":372,"context_line":"        # we only care about dvr_snat, or dvr"},{"line_number":373,"context_line":"        if enable_snat:"},{"line_number":374,"context_line":"            self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027"},{"line_number":375,"context_line":"        else:"},{"line_number":376,"context_line":"            self.agent.conf.agent_mode \u003d \u0027dvr\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_7435c0d9","line":373,"in_reply_to":"3a961159_e9b10045","updated":"2015-01-15 21:30:09.000000000","message":"thanks. will do.","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8fd8d5192387cad8955721cc33e738337486eb2c","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        snat_ns_name \u003d self.agent.get_snat_ns_name(router.router_id)"},{"line_number":435,"context_line":"        # if the agent is in dvr_snat mode the snat namespace"},{"line_number":436,"context_line":"        # should be present"},{"line_number":437,"context_line":"        if self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":438,"context_line":"            self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":439,"context_line":"                external_port, self.agent.get_external_device_name,"},{"line_number":440,"context_line":"                snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_e988206d","line":437,"updated":"2015-01-15 03:40:16.000000000","message":"same here, you could do:\n\n agent_mode \u003d self.agent.conf.agent_mode\n assert_func \u003d self.assertFalse if agent_mode \u003d\u003d \u0027dvr\u0027 else self.assertTrue\n\n assert_func(bla bla)","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"de7aea3ff17709bf91679468069a7b8627903db0","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        snat_ns_name \u003d self.agent.get_snat_ns_name(router.router_id)"},{"line_number":435,"context_line":"        # if the agent is in dvr_snat mode the snat namespace"},{"line_number":436,"context_line":"        # should be present"},{"line_number":437,"context_line":"        if self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":438,"context_line":"            self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":439,"context_line":"                external_port, self.agent.get_external_device_name,"},{"line_number":440,"context_line":"                snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_484d8e3a","line":437,"in_reply_to":"3a961159_e988206d","updated":"2015-01-15 21:30:09.000000000","message":"The test for snat namespace not present was incorrect. each one of the cases: dvr and dvr_snat has a different validation (different assert_func).  I think it reads easier with the if statement.","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8fd8d5192387cad8955721cc33e738337486eb2c","unresolved":false,"context_lines":[{"line_number":444,"context_line":"            self.assertFalse(self.device_exists_with_ip_mac("},{"line_number":445,"context_line":"                external_port, self.agent.get_external_device_name,"},{"line_number":446,"context_line":"                snat_ns_name))"},{"line_number":447,"context_line":"        # if the agent is antyhing else the test is misconfigured"},{"line_number":448,"context_line":"        # we force a test failure with message"},{"line_number":449,"context_line":"        else:"},{"line_number":450,"context_line":"            self.assertTrue(False, \" agent not configured for dvr or dvr_snat\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_49ef741d","line":447,"updated":"2015-01-15 03:40:16.000000000","message":"typo","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8fd8d5192387cad8955721cc33e738337486eb2c","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                snat_ns_name))"},{"line_number":447,"context_line":"        # if the agent is antyhing else the test is misconfigured"},{"line_number":448,"context_line":"        # we force a test failure with message"},{"line_number":449,"context_line":"        else:"},{"line_number":450,"context_line":"            self.assertTrue(False, \" agent not configured for dvr or dvr_snat\")"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    def _assert_gateway(self, router):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_c9e2842f","line":449,"updated":"2015-01-15 03:40:16.000000000","message":"this shouldn\u0027t occur, should it?","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"de7aea3ff17709bf91679468069a7b8627903db0","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                snat_ns_name))"},{"line_number":447,"context_line":"        # if the agent is antyhing else the test is misconfigured"},{"line_number":448,"context_line":"        # we force a test failure with message"},{"line_number":449,"context_line":"        else:"},{"line_number":450,"context_line":"            self.assertTrue(False, \" agent not configured for dvr or dvr_snat\")"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    def _assert_gateway(self, router):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_88d77622","line":449,"in_reply_to":"3a961159_c9e2842f","updated":"2015-01-15 21:30:09.000000000","message":"No it should not. But this is a method iniside the test class and the methodcould  be called by some other test written in the future. We can\u0027t control the agent_configuration so it is left  left to the caller to configure the agent appropiately. I put this in here just in case it is called with a misconfigured agent, to prevent an incorrect test result, and help in debugging any faiulres.","commit_id":"ca51e277ec4aac228ae5554967b1a38d5d2a4656"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            enable_snat\u003denable_snat,"},{"line_number":100,"context_line":"            enable_floating_ip\u003denable_floating_ip,"},{"line_number":101,"context_line":"            enable_ha\u003denable_ha)"},{"line_number":102,"context_line":"        int_ports \u003d router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":103,"context_line":"        router[\u0027distributed\u0027] \u003d True"},{"line_number":104,"context_line":"        router[\u0027gw_port_host\u0027] \u003d self.agent.conf.host"},{"line_number":105,"context_line":"        router[\u0027gw_port\u0027][\u0027binding:host_id\u0027] \u003d self.agent.conf.host"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_eeff1bff","line":102,"updated":"2015-01-16 01:24:54.000000000","message":"int_ports -\u003e internal_ports ?\n\nint is an overloaded term","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            enable_snat\u003denable_snat,"},{"line_number":100,"context_line":"            enable_floating_ip\u003denable_floating_ip,"},{"line_number":101,"context_line":"            enable_ha\u003denable_ha)"},{"line_number":102,"context_line":"        int_ports \u003d router.get(l3_constants.INTERFACE_KEY, [])"},{"line_number":103,"context_line":"        router[\u0027distributed\u0027] \u003d True"},{"line_number":104,"context_line":"        router[\u0027gw_port_host\u0027] \u003d self.agent.conf.host"},{"line_number":105,"context_line":"        router[\u0027gw_port\u0027][\u0027binding:host_id\u0027] \u003d self.agent.conf.host"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_1d1d0663","line":102,"in_reply_to":"3a961159_eeff1bff","updated":"2015-01-20 21:59:02.000000000","message":"Done.","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        floating_ip[\u0027port_id\u0027] \u003d int_ports[0][\u0027id\u0027]"},{"line_number":110,"context_line":"        floating_ip[\u0027status\u0027] \u003d \u0027ACTIVE\u0027"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # If snat is not enable that is all we need to do so"},{"line_number":113,"context_line":"        # we can return the data"},{"line_number":114,"context_line":"        if not enable_snat:"},{"line_number":115,"context_line":"            return router"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ce141f43","line":112,"updated":"2015-01-16 01:24:54.000000000","message":"This comment duplicates the intent of the code below - please remove.  A comment is only warranted if the \u0027why\u0027 of code is unclear.","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        floating_ip[\u0027port_id\u0027] \u003d int_ports[0][\u0027id\u0027]"},{"line_number":110,"context_line":"        floating_ip[\u0027status\u0027] \u003d \u0027ACTIVE\u0027"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # If snat is not enable that is all we need to do so"},{"line_number":113,"context_line":"        # we can return the data"},{"line_number":114,"context_line":"        if not enable_snat:"},{"line_number":115,"context_line":"            return router"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_bd2dd291","line":112,"in_reply_to":"3a961159_ce141f43","updated":"2015-01-20 21:59:02.000000000","message":"Done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if not enable_snat:"},{"line_number":115,"context_line":"            return router"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # if snat is enabled we need to add the snat port"},{"line_number":118,"context_line":"        # information to the router"},{"line_number":119,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":120,"context_line":"        # We add the port only if the snat_port_list is less than 1 (zero)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ce2b3f7a","line":117,"updated":"2015-01-16 01:24:54.000000000","message":"snat is enabled, please rephrase accordingly, e.g.\n\n# Add snat port info to router","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if not enable_snat:"},{"line_number":115,"context_line":"            return router"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # if snat is enabled we need to add the snat port"},{"line_number":118,"context_line":"        # information to the router"},{"line_number":119,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":120,"context_line":"        # We add the port only if the snat_port_list is less than 1 (zero)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_fd759a97","line":117,"in_reply_to":"3a961159_ce2b3f7a","updated":"2015-01-20 21:59:02.000000000","message":"Done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        # if snat is enabled we need to add the snat port"},{"line_number":118,"context_line":"        # information to the router"},{"line_number":119,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":120,"context_line":"        # We add the port only if the snat_port_list is less than 1 (zero)"},{"line_number":121,"context_line":"        # and if the number of int_ports is more than 0 (at least one)"},{"line_number":122,"context_line":"        if not snat_port_list and int_ports:"},{"line_number":123,"context_line":"            # Get values from internal port"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ee4d5b73","line":120,"updated":"2015-01-16 01:24:54.000000000","message":"Pointless comment","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        # if snat is enabled we need to add the snat port"},{"line_number":118,"context_line":"        # information to the router"},{"line_number":119,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":120,"context_line":"        # We add the port only if the snat_port_list is less than 1 (zero)"},{"line_number":121,"context_line":"        # and if the number of int_ports is more than 0 (at least one)"},{"line_number":122,"context_line":"        if not snat_port_list and int_ports:"},{"line_number":123,"context_line":"            # Get values from internal port"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_dd97fe9a","line":120,"in_reply_to":"3a961159_ee4d5b73","updated":"2015-01-20 21:59:02.000000000","message":"Done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            fixed_ip \u003d port[\u0027fixed_ips\u0027][0]"},{"line_number":126,"context_line":"            snat_subnet \u003d port[\u0027subnet\u0027]"},{"line_number":127,"context_line":"            port_ip \u003d fixed_ip[\u0027ip_address\u0027]"},{"line_number":128,"context_line":"            # Pick an ip address which is not the same as port_ip"},{"line_number":129,"context_line":"            if port_ip[-1] !\u003d \"9\":"},{"line_number":130,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":131,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_2ea203fc","line":128,"updated":"2015-01-16 01:24:54.000000000","message":"Avoid doing manual ip address math.  Use the netaddr library instead, e.g.\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L232\n\n\nAlso: http://netaddr.readthedocs.org/en/latest/api.html#ip-addresses","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            fixed_ip \u003d port[\u0027fixed_ips\u0027][0]"},{"line_number":126,"context_line":"            snat_subnet \u003d port[\u0027subnet\u0027]"},{"line_number":127,"context_line":"            port_ip \u003d fixed_ip[\u0027ip_address\u0027]"},{"line_number":128,"context_line":"            # Pick an ip address which is not the same as port_ip"},{"line_number":129,"context_line":"            if port_ip[-1] !\u003d \"9\":"},{"line_number":130,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":131,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_8e12db56","line":128,"in_reply_to":"3a961159_2ea203fc","updated":"2015-01-20 21:59:02.000000000","message":"Done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":131,"context_line":"            else:"},{"line_number":132,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"8\""},{"line_number":133,"context_line":"            # Add the info to router as the first snapt port"},{"line_number":134,"context_line":"            # in the list of snat ports"},{"line_number":135,"context_line":"            router[l3_constants.SNAT_ROUTER_INTF_KEY] \u003d ["},{"line_number":136,"context_line":"                {\u0027subnet\u0027:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_2e792382","line":133,"updated":"2015-01-16 01:24:54.000000000","message":"snapt -\u003e snat","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"9\""},{"line_number":131,"context_line":"            else:"},{"line_number":132,"context_line":"                snat_ip \u003d port_ip[0:-1] + \"8\""},{"line_number":133,"context_line":"            # Add the info to router as the first snapt port"},{"line_number":134,"context_line":"            # in the list of snat ports"},{"line_number":135,"context_line":"            router[l3_constants.SNAT_ROUTER_INTF_KEY] \u003d ["},{"line_number":136,"context_line":"                {\u0027subnet\u0027:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_ce1ce36d","line":133,"in_reply_to":"3a961159_2e792382","updated":"2015-01-20 21:59:02.000000000","message":"Done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        self._router_lifecycle(enable_ha\u003dTrue)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":288,"context_line":"        \u0027\u0027\u0027This test verify the lifecycle of a dvr router when it is"},{"line_number":289,"context_line":"        configured only with fips (wihtout ha and without snat)"},{"line_number":290,"context_line":"        \u0027\u0027\u0027"},{"line_number":291,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_a3736c14","line":288,"updated":"2015-01-16 01:24:54.000000000","message":"This docstring duplicates the info in the test name, please remove.  Only if the test name cannot be made sufficiently clear is a docstring suggested.","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        self._router_lifecycle(enable_ha\u003dTrue)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":288,"context_line":"        \u0027\u0027\u0027This test verify the lifecycle of a dvr router when it is"},{"line_number":289,"context_line":"        configured only with fips (wihtout ha and without snat)"},{"line_number":290,"context_line":"        \u0027\u0027\u0027"},{"line_number":291,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_0e4d0b73","line":288,"in_reply_to":"3a961159_a3736c14","updated":"2015-01-20 21:59:02.000000000","message":"removed docstring","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def test_dvr_router_lifecycle_without_ha_with_snat_with_fips(self):"},{"line_number":295,"context_line":"        \u0027\u0027\u0027This test verify the lifecycle of a dvr router when it is"},{"line_number":296,"context_line":"        configured with fips and snat only (wihtout ha)"},{"line_number":297,"context_line":"        \u0027\u0027\u0027"},{"line_number":298,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_435ac882","line":295,"updated":"2015-01-16 01:24:54.000000000","message":"Please remove","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":292,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def test_dvr_router_lifecycle_without_ha_with_snat_with_fips(self):"},{"line_number":295,"context_line":"        \u0027\u0027\u0027This test verify the lifecycle of a dvr router when it is"},{"line_number":296,"context_line":"        configured with fips and snat only (wihtout ha)"},{"line_number":297,"context_line":"        \u0027\u0027\u0027"},{"line_number":298,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_4e571303","line":295,"in_reply_to":"3a961159_435ac882","updated":"2015-01-20 21:59:02.000000000","message":"removed docstring","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def _dvr_router_lifecycle(self, enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":373,"context_line":"                              enable_floating_ip\u003dFalse):"},{"line_number":374,"context_line":"        # This method does the bulk of the testing."},{"line_number":375,"context_line":"        # We use the value of enable_snat to figure out the agent_mode."},{"line_number":376,"context_line":"        # The value of agent_mode can be dvr, dvr_snat, or legacy"},{"line_number":377,"context_line":"        # since by definition we are in dvr (distributed \u003d true)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_2e0cc3eb","line":374,"updated":"2015-01-16 01:24:54.000000000","message":"(No action required) Documenting methods is best done via a docstring, e.g.\n\nhttps://github.com/openstack/neutron/blob/master/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py#L862 \n\nAlso: https://pythonhosted.org/an_example_pypi_project/sphinx.html#full-code-example","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    def _dvr_router_lifecycle(self, enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":373,"context_line":"                              enable_floating_ip\u003dFalse):"},{"line_number":374,"context_line":"        # This method does the bulk of the testing."},{"line_number":375,"context_line":"        # We use the value of enable_snat to figure out the agent_mode."},{"line_number":376,"context_line":"        # The value of agent_mode can be dvr, dvr_snat, or legacy"},{"line_number":377,"context_line":"        # since by definition we are in dvr (distributed \u003d true)"},{"line_number":378,"context_line":"        # we only care about dvr_snat, or dvr"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_4eb4aff0","line":375,"updated":"2015-01-16 01:24:54.000000000","message":"(No action required) The convention in python is to prescribe rather than describe in comments and docstrings, e.g.\n\nUse the value of... vs We use the value","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    def _dvr_router_lifecycle(self, enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":373,"context_line":"                              enable_floating_ip\u003dFalse):"},{"line_number":374,"context_line":"        # This method does the bulk of the testing."},{"line_number":375,"context_line":"        # We use the value of enable_snat to figure out the agent_mode."},{"line_number":376,"context_line":"        # The value of agent_mode can be dvr, dvr_snat, or legacy"},{"line_number":377,"context_line":"        # since by definition we are in dvr (distributed \u003d true)"},{"line_number":378,"context_line":"        # we only care about dvr_snat, or dvr"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_ce194324","line":375,"in_reply_to":"3a961159_4eb4aff0","updated":"2015-01-20 21:59:02.000000000","message":"done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        router_info \u003d self.generate_dvr_router_info("},{"line_number":383,"context_line":"            enable_ha, enable_snat, enable_floating_ip)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # We need to mock the get_agent_gateway_port return value"},{"line_number":386,"context_line":"        # because the whole L3PluginApi is mocked and we need the port"},{"line_number":387,"context_line":"        # gateway_port information before the l3_agent will create it."},{"line_number":388,"context_line":"        # The port returned needs to have the same information as"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ae16f3ef","line":385,"updated":"2015-01-16 01:24:54.000000000","message":"(No action required) The need to mock out so much stuff is a good indication that the code under test is poorly structured and in need of a refactor for testability.","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        router_info \u003d self.generate_dvr_router_info("},{"line_number":383,"context_line":"            enable_ha, enable_snat, enable_floating_ip)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # We need to mock the get_agent_gateway_port return value"},{"line_number":386,"context_line":"        # because the whole L3PluginApi is mocked and we need the port"},{"line_number":387,"context_line":"        # gateway_port information before the l3_agent will create it."},{"line_number":388,"context_line":"        # The port returned needs to have the same information as"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_6e2bef30","line":385,"in_reply_to":"3a961159_ae16f3ef","updated":"2015-01-20 21:59:02.000000000","message":"done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        # attach interfaces, etc...)"},{"line_number":405,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # Next we do all our checks to make sure everything is as expected."},{"line_number":408,"context_line":"        self.assertTrue(self._namespace_exists(router))"},{"line_number":409,"context_line":"        self.assertTrue(self._metadata_proxy_exists(self.agent.conf, router))"},{"line_number":410,"context_line":"        self._assert_internal_devices(router)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ce96df48","line":407,"updated":"2015-01-16 01:24:54.000000000","message":"Pointless comment","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        # attach interfaces, etc...)"},{"line_number":405,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # Next we do all our checks to make sure everything is as expected."},{"line_number":408,"context_line":"        self.assertTrue(self._namespace_exists(router))"},{"line_number":409,"context_line":"        self.assertTrue(self._metadata_proxy_exists(self.agent.conf, router))"},{"line_number":410,"context_line":"        self._assert_internal_devices(router)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_8e1f3b09","line":407,"in_reply_to":"3a961159_ce96df48","updated":"2015-01-20 21:59:02.000000000","message":"removed","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        self._assert_floating_ip_chains(router)"},{"line_number":416,"context_line":"        self._assert_metadata_chains(router)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        # Next delete the router and assert it is gone"},{"line_number":419,"context_line":"        self._delete_router(self.agent, router.router_id)"},{"line_number":420,"context_line":"        self._assert_router_does_not_exist(router)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_4eabcf87","line":418,"updated":"2015-01-16 01:24:54.000000000","message":"Pointless comment","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        self._assert_floating_ip_chains(router)"},{"line_number":416,"context_line":"        self._assert_metadata_chains(router)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        # Next delete the router and assert it is gone"},{"line_number":419,"context_line":"        self._delete_router(self.agent, router.router_id)"},{"line_number":420,"context_line":"        self._assert_router_does_not_exist(router)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_4e26336a","line":418,"in_reply_to":"3a961159_4eabcf87","updated":"2015-01-20 21:59:02.000000000","message":"removed","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # if the agent is in dvr_snat mode, then we have to check"},{"line_number":440,"context_line":"        # that the correct ports and ip addresses exist in the"},{"line_number":441,"context_line":"        # stnat_ns_name namespace"},{"line_number":442,"context_line":"        if self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":443,"context_line":"            self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":444,"context_line":"                external_port, self.agent.get_external_device_name,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_e3c73410","line":441,"updated":"2015-01-16 01:24:54.000000000","message":"stnat -\u003e snat","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # if the agent is in dvr_snat mode, then we have to check"},{"line_number":440,"context_line":"        # that the correct ports and ip addresses exist in the"},{"line_number":441,"context_line":"        # stnat_ns_name namespace"},{"line_number":442,"context_line":"        if self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":443,"context_line":"            self.assertTrue(self.device_exists_with_ip_mac("},{"line_number":444,"context_line":"                external_port, self.agent.get_external_device_name,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_8ee65b15","line":441,"in_reply_to":"3a961159_e3c73410","updated":"2015-01-20 21:59:02.000000000","message":"corrected","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        # should not be present at all:"},{"line_number":448,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":449,"context_line":"            self.assertFalse("},{"line_number":450,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":451,"context_line":"                .exists(snat_ns_name),"},{"line_number":452,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":453,"context_line":"                % (str(snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_8372f0e0","line":450,"updated":"2015-01-16 01:24:54.000000000","message":"-\u003e self._namespace_exists(snat_ns_name)","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        # should not be present at all:"},{"line_number":448,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":449,"context_line":"            self.assertFalse("},{"line_number":450,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":451,"context_line":"                .exists(snat_ns_name),"},{"line_number":452,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":453,"context_line":"                % (str(snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_eef8bf4b","line":450,"in_reply_to":"3a961159_8372f0e0","updated":"2015-01-20 21:59:02.000000000","message":"This won\u0027t work. _namespace_exists(ROUTER)\ntakes a router object from which it pulls the router.ns_name\nThat is not what is wanted here. the namespace being looked for is the \nsnat namespace (..agent.get_snat_ns_name(router.router._id))\n\nI could add a new function; but that seems superfluous since the call would look like \n\nsome_new_function(self, namespace)\nreturn ip_lib.IpNetnsCommand(ip_lib.SubProcessBase()).exists(namespace)","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":451,"context_line":"                .exists(snat_ns_name),"},{"line_number":452,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":453,"context_line":"                % (str(snat_ns_name))"},{"line_number":454,"context_line":"                            )"},{"line_number":455,"context_line":"        # if the agent is anythimg else the test is misconfigured"},{"line_number":456,"context_line":"        # we force a test failure with message"},{"line_number":457,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_63db44ed","line":454,"updated":"2015-01-16 01:24:54.000000000","message":"The openstack style rules require that closing brackets be aligned with the start of the line containing the opening bracket, e.g.\n\nself.assertFalse(\n     ....\n)","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":451,"context_line":"                .exists(snat_ns_name),"},{"line_number":452,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":453,"context_line":"                % (str(snat_ns_name))"},{"line_number":454,"context_line":"                            )"},{"line_number":455,"context_line":"        # if the agent is anythimg else the test is misconfigured"},{"line_number":456,"context_line":"        # we force a test failure with message"},{"line_number":457,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_ee8fdfca","line":454,"in_reply_to":"3a961159_63db44ed","updated":"2015-01-20 21:59:02.000000000","message":"corrected","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":453,"context_line":"                % (str(snat_ns_name))"},{"line_number":454,"context_line":"                            )"},{"line_number":455,"context_line":"        # if the agent is anythimg else the test is misconfigured"},{"line_number":456,"context_line":"        # we force a test failure with message"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            self.assertTrue(False, \" agent not configured for dvr or dvr_snat\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_03f2806e","line":455,"updated":"2015-01-16 01:24:54.000000000","message":"anythimg -\u003e anything","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        expected_gateway \u003d external_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":470,"context_line":"        self.assertEqual(expected_gateway, existing_gateway)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def _assert_dvr_gateway_in_namespace(self, router, namespace):"},{"line_number":473,"context_line":"        # If agent is in dvr_snat mode we expect the gateway"},{"line_number":474,"context_line":"        # to be in the namespace"},{"line_number":475,"context_line":"        if self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_6ed16bfa","line":472,"updated":"2015-01-16 01:24:54.000000000","message":"This method name doesn\u0027t make much sense considering that only the first conditional seems to match the stated intent.  Also, this method is only called by assert_dvr_gateway - maybe the body of this method should be simply included in that method to avoid confusion?","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        self.assertEqual(expected_gateway, existing_gateway)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def _assert_dvr_gateway_in_namespace(self, router, namespace):"},{"line_number":473,"context_line":"        # If agent is in dvr_snat mode we expect the gateway"},{"line_number":474,"context_line":"        # to be in the namespace"},{"line_number":475,"context_line":"        if self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":476,"context_line":"            external_port \u003d self.agent._get_ex_gw_port(router)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ae727347","line":473,"updated":"2015-01-16 01:24:54.000000000","message":"(No action required) Consider using a self-documenting conditional instead of a comment, e.g.\n\ngateway_expected_in_namespace \u003d (self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027)\nif gateway_expected_in_namespace:\n  ...\n\nThis makes the code clearer and reduces maintenance if the logic changes.","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        self.assertEqual(expected_gateway, existing_gateway)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def _assert_dvr_gateway_in_namespace(self, router, namespace):"},{"line_number":473,"context_line":"        # If agent is in dvr_snat mode we expect the gateway"},{"line_number":474,"context_line":"        # to be in the namespace"},{"line_number":475,"context_line":"        if self.agent.conf.agent_mode \u003d\u003d \u0027dvr_snat\u0027:"},{"line_number":476,"context_line":"            external_port \u003d self.agent._get_ex_gw_port(router)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_34d5b643","line":473,"in_reply_to":"3a961159_ae727347","updated":"2015-01-20 21:59:02.000000000","message":"done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                external_device.route.get_gateway().get(\u0027gateway\u0027))"},{"line_number":484,"context_line":"            expected_gateway \u003d external_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":485,"context_line":"            self.assertEqual(expected_gateway, existing_gateway)"},{"line_number":486,"context_line":"        # else we expect the namespace to not be there at all"},{"line_number":487,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":488,"context_line":"            self.assertFalse("},{"line_number":489,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_aea9937d","line":486,"updated":"2015-01-16 01:24:54.000000000","message":"(No action required) e.g.\n\nnamespace_should_not_exist \u003d (self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027)\nif namespace_should_not_exist:\n  ...","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                external_device.route.get_gateway().get(\u0027gateway\u0027))"},{"line_number":484,"context_line":"            expected_gateway \u003d external_port[\u0027subnet\u0027][\u0027gateway_ip\u0027]"},{"line_number":485,"context_line":"            self.assertEqual(expected_gateway, existing_gateway)"},{"line_number":486,"context_line":"        # else we expect the namespace to not be there at all"},{"line_number":487,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":488,"context_line":"            self.assertFalse("},{"line_number":489,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_54ca42a2","line":486,"in_reply_to":"3a961159_aea9937d","updated":"2015-01-20 21:59:02.000000000","message":"done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":517,"context_line":"        fip_ns_name \u003d ("},{"line_number":518,"context_line":"            self.agent.get_fip_ns_name(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":519,"context_line":"                )"},{"line_number":520,"context_line":"        # Check that the fg port is created correctly"},{"line_number":521,"context_line":"        self.assertTrue(ip_lib.device_exists_with_ip_mac("},{"line_number":522,"context_line":"            self.agent.get_fip_ext_device_name(external_port[\u0027id\u0027]),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_ced25ffc","line":519,"updated":"2015-01-16 01:24:54.000000000","message":"PEP8 parenthesis alignment","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":517,"context_line":"        fip_ns_name \u003d ("},{"line_number":518,"context_line":"            self.agent.get_fip_ns_name(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":519,"context_line":"                )"},{"line_number":520,"context_line":"        # Check that the fg port is created correctly"},{"line_number":521,"context_line":"        self.assertTrue(ip_lib.device_exists_with_ip_mac("},{"line_number":522,"context_line":"            self.agent.get_fip_ext_device_name(external_port[\u0027id\u0027]),"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_745f3e73","line":519,"in_reply_to":"3a961159_ced25ffc","updated":"2015-01-20 21:59:02.000000000","message":"done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"190df98b1fd417420c453183ad93f1eacdc63a8f","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        fip_ns_name \u003d ("},{"line_number":518,"context_line":"            self.agent.get_fip_ns_name(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":519,"context_line":"                )"},{"line_number":520,"context_line":"        # Check that the fg port is created correctly"},{"line_number":521,"context_line":"        self.assertTrue(ip_lib.device_exists_with_ip_mac("},{"line_number":522,"context_line":"            self.agent.get_fip_ext_device_name(external_port[\u0027id\u0027]),"},{"line_number":523,"context_line":"            external_port[\u0027ip_cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_aeeef3b2","line":520,"updated":"2015-01-16 01:24:54.000000000","message":"(No action required) consider using a self-documenting boolean rather than using a comment, i.e.\n\n fg_port_created_successfully \u003d ip_lib.device_exists_with_ip_mac(...)\n self.assertTrue(fg_port_created_successfully)","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"e9f6f6ac9a6012a087e8997c7ba215a7b744fa75","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        fip_ns_name \u003d ("},{"line_number":518,"context_line":"            self.agent.get_fip_ns_name(floating_ips[0][\u0027floating_network_id\u0027])"},{"line_number":519,"context_line":"                )"},{"line_number":520,"context_line":"        # Check that the fg port is created correctly"},{"line_number":521,"context_line":"        self.assertTrue(ip_lib.device_exists_with_ip_mac("},{"line_number":522,"context_line":"            self.agent.get_fip_ext_device_name(external_port[\u0027id\u0027]),"},{"line_number":523,"context_line":"            external_port[\u0027ip_cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a930d6b_3fa02ff4","line":520,"in_reply_to":"3a961159_aeeef3b2","updated":"2015-01-20 21:59:02.000000000","message":"done","commit_id":"03d9a916c01ecdd43364a6f0a8b7e033ed80459a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b67461f95ceab8ac4a8430baa867a3b70c3eff25","unresolved":false,"context_lines":[{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def _dvr_router_lifecycle(self, enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":360,"context_line":"                              enable_floating_ip\u003dFalse):"},{"line_number":361,"context_line":"        \u0027\u0027\u0027\u0027\u0027 Test dvr router lifecycle"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        :param enable_ha: sets the ha value for the router."},{"line_number":364,"context_line":"        :param enable_snat:  the value of enable_snat is used"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_b440c136","line":361,"updated":"2015-01-21 01:39:36.000000000","message":"(nit) it\u0027s not harmful to include more, but docstrings should be triple-quoted, e.g.\n\n\"\"\"Foo\n\n\"\"\"","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5c2ea2c21e707762d3156710b99636007b9868cb","unresolved":false,"context_lines":[{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def _dvr_router_lifecycle(self, enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":360,"context_line":"                              enable_floating_ip\u003dFalse):"},{"line_number":361,"context_line":"        \u0027\u0027\u0027\u0027\u0027 Test dvr router lifecycle"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        :param enable_ha: sets the ha value for the router."},{"line_number":364,"context_line":"        :param enable_snat:  the value of enable_snat is used"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_61ed94c3","line":361,"in_reply_to":"1a930d6b_b440c136","updated":"2015-01-22 00:12:05.000000000","message":"Done","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b67461f95ceab8ac4a8430baa867a3b70c3eff25","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        \u0027\u0027\u0027\u0027\u0027 Test dvr router lifecycle"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        :param enable_ha: sets the ha value for the router."},{"line_number":364,"context_line":"        :param enable_snat:  the value of enable_snat is used"},{"line_number":365,"context_line":"        to  set the  agent_mode."},{"line_number":366,"context_line":"        :param enable_floating_ip: used to indicate weather or not"},{"line_number":367,"context_line":"        the router will have floating ips associated with it."}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_54795d92","line":364,"updated":"2015-01-21 01:39:36.000000000","message":"(nit) the convention is to align the docs for a parameter, e.g.\n\n:param enable_snat: the value of enable_snat is used\n                    to set the agent_mode.","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5c2ea2c21e707762d3156710b99636007b9868cb","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        \u0027\u0027\u0027\u0027\u0027 Test dvr router lifecycle"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        :param enable_ha: sets the ha value for the router."},{"line_number":364,"context_line":"        :param enable_snat:  the value of enable_snat is used"},{"line_number":365,"context_line":"        to  set the  agent_mode."},{"line_number":366,"context_line":"        :param enable_floating_ip: used to indicate weather or not"},{"line_number":367,"context_line":"        the router will have floating ips associated with it."}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_41ffb867","line":364,"in_reply_to":"1a930d6b_54795d92","updated":"2015-01-22 00:12:05.000000000","message":"will do","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b67461f95ceab8ac4a8430baa867a3b70c3eff25","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        # should not be present at all:"},{"line_number":440,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":441,"context_line":"            self.assertFalse("},{"line_number":442,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":443,"context_line":"                .exists(snat_ns_name),"},{"line_number":444,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":445,"context_line":"                % (str(snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_a00b202a","line":442,"updated":"2015-01-21 01:39:36.000000000","message":"This is an example where a simple refactor is warranted.  Please make the following change and use the revised function here:\n\ndef _namespace_exists(self, namespace):\n  ip \u003d ip_lib.IPWrapper(self.root_helper, namespace)\n  return ip.netns.exists(namespace)\n\nAnd then s/_namespace_exists(router)/_namespace_exists(router.ns_name)","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b67461f95ceab8ac4a8430baa867a3b70c3eff25","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def _assert_snat_namespace_does_not_exist(self, router):"},{"line_number":478,"context_line":"        namespace \u003d self.agent.get_snat_ns_name(router.router_id)"},{"line_number":479,"context_line":"        self.assertFalse("},{"line_number":480,"context_line":"            ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":481,"context_line":"            .exists(namespace),"},{"line_number":482,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_54179da3","line":479,"updated":"2015-01-21 01:39:36.000000000","message":"-\u003e self.assertFalse(_namespace_exists(namespace))","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5c2ea2c21e707762d3156710b99636007b9868cb","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def _assert_snat_namespace_does_not_exist(self, router):"},{"line_number":478,"context_line":"        namespace \u003d self.agent.get_snat_ns_name(router.router_id)"},{"line_number":479,"context_line":"        self.assertFalse("},{"line_number":480,"context_line":"            ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":481,"context_line":"            .exists(namespace),"},{"line_number":482,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_219b8c19","line":479,"in_reply_to":"1a930d6b_54179da3","updated":"2015-01-22 00:12:05.000000000","message":"Done","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"b67461f95ceab8ac4a8430baa867a3b70c3eff25","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        if gateway_expected_in_snat_namespace:"},{"line_number":489,"context_line":"            self._assert_dvr_snat_gateway(router)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        snat_namespace_should_not_exists \u003d ("},{"line_number":492,"context_line":"            self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027"},{"line_number":493,"context_line":"        )"},{"line_number":494,"context_line":"        if snat_namespace_should_not_exists:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_5404fd14","line":491,"updated":"2015-01-21 01:39:36.000000000","message":"(nit) exists -\u003e exist","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5c2ea2c21e707762d3156710b99636007b9868cb","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        if gateway_expected_in_snat_namespace:"},{"line_number":489,"context_line":"            self._assert_dvr_snat_gateway(router)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        snat_namespace_should_not_exists \u003d ("},{"line_number":492,"context_line":"            self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027"},{"line_number":493,"context_line":"        )"},{"line_number":494,"context_line":"        if snat_namespace_should_not_exists:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a930d6b_a1869cb7","line":491,"in_reply_to":"1a930d6b_5404fd14","updated":"2015-01-22 00:12:05.000000000","message":"Done","commit_id":"3efabb1fbd948c5f9c81c19650e48d9d51b65a9c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"57fde2f014cc5461fa8563c9422bf8ff53d42c79","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        self.assertIn(str(webob.exc.HTTPOk.code), firstline.split())"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"class TestDvrRouter(L3AgentTestFramework):"},{"line_number":481,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":482,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":483,"context_line":"                                   enable_floating_ip\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_ee0ed633","line":480,"updated":"2015-01-21 19:56:37.000000000","message":"aren\u0027t we running some tests twice now? See here:\n\n - http://logs.openstack.org/32/138632/10/check/check-neutron-dsvm-functional/313c941/testr_results.html.gz\n\n - http://logs.openstack.org/32/138632/11/check/check-neutron-dsvm-functional/d72e192/testr_results.html.gz\n\nI see a lot more tests in the PS11 run comparing to the run for PS10.","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"38c29881797ed6ea85e2d4d9469daae7cebfe672","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        self.assertIn(str(webob.exc.HTTPOk.code), firstline.split())"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"class TestDvrRouter(L3AgentTestFramework):"},{"line_number":481,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":482,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":483,"context_line":"                                   enable_floating_ip\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_4e81aa8e","line":480,"in_reply_to":"1a930d6b_ee0ed633","updated":"2015-01-21 20:28:45.000000000","message":"disregard...brainfart of mine.","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":479,"context_line":""},{"line_number":480,"context_line":"class TestDvrRouter(L3AgentTestFramework):"},{"line_number":481,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":482,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":483,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def test_dvr_router_lifecycle_without_ha_with_snat_with_fips(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_f146b722","line":482,"updated":"2015-01-21 21:10:32.000000000","message":"The enable_ha parameter is always False.  Are there going to be future dvr tests that ever set it to True?  If not, consider removing the parameter entirely and hard-coding a value of False on line 549.","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":479,"context_line":""},{"line_number":480,"context_line":"class TestDvrRouter(L3AgentTestFramework):"},{"line_number":481,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":482,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":483,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def test_dvr_router_lifecycle_without_ha_with_snat_with_fips(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_e1a7c44d","line":482,"in_reply_to":"1a930d6b_f146b722","updated":"2015-01-22 09:01:53.000000000","message":"Armando is correct, once support for dvr_ha routers is merged test will be added. I did not add because right now that test would fail","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d60b21eb05a0087f59225a4b307353ac022e8472","unresolved":false,"context_lines":[{"line_number":479,"context_line":""},{"line_number":480,"context_line":"class TestDvrRouter(L3AgentTestFramework):"},{"line_number":481,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":482,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":483,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def test_dvr_router_lifecycle_without_ha_with_snat_with_fips(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_6c902e96","line":482,"in_reply_to":"1a930d6b_f146b722","updated":"2015-01-21 21:14:34.000000000","message":"Rajeev and Mike are working on adding HA support to DVR (and viceversa). I would be open to keeping this in the hope that more functional tests would follow shortly.\n\n - https://review.openstack.org/#/c/143169/\n - https://review.openstack.org/#/c/139686/","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":480,"context_line":"class TestDvrRouter(L3AgentTestFramework):"},{"line_number":481,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":482,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":483,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def test_dvr_router_lifecycle_without_ha_with_snat_with_fips(self):"},{"line_number":486,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_31f67fd8","line":483,"updated":"2015-01-21 21:10:32.000000000","message":"The enable_floating_ip parameter is always True.  Are there going to be future dvr tests that ever set it to False?  If not, consider removing the parameter entirely and hard-coding a value of True on line 548.","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":480,"context_line":"class TestDvrRouter(L3AgentTestFramework):"},{"line_number":481,"context_line":"    def test_dvr_router_lifecycle_without_ha_without_snat_with_fips(self):"},{"line_number":482,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":483,"context_line":"                                   enable_floating_ip\u003dTrue)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def test_dvr_router_lifecycle_without_ha_with_snat_with_fips(self):"},{"line_number":486,"context_line":"        self._dvr_router_lifecycle(enable_ha\u003dFalse, enable_snat\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_84c44e93","line":483,"in_reply_to":"1a930d6b_31f67fd8","updated":"2015-01-22 09:01:53.000000000","message":"No there is no current plan to support fips\u003ddisable on dvr routers.  Removed parameter and configured line 548 as suggested.","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _dvr_router_lifecycle(self, enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":490,"context_line":"                              enable_floating_ip\u003dFalse):"},{"line_number":491,"context_line":"        \u0027\u0027\u0027\u0027\u0027 Test dvr router lifecycle"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        :param enable_ha: sets the ha value for the router."},{"line_number":494,"context_line":"        :param enable_snat:  the value of enable_snat is used"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_f1e23702","line":491,"updated":"2015-01-21 21:10:32.000000000","message":"(nit) \u0027\u0027\u0027\u0027\u0027 -\u003e \u0027\u0027\u0027","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _dvr_router_lifecycle(self, enable_ha\u003dFalse, enable_snat\u003dFalse,"},{"line_number":490,"context_line":"                              enable_floating_ip\u003dFalse):"},{"line_number":491,"context_line":"        \u0027\u0027\u0027\u0027\u0027 Test dvr router lifecycle"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        :param enable_ha: sets the ha value for the router."},{"line_number":494,"context_line":"        :param enable_snat:  the value of enable_snat is used"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_c12f28a0","line":491,"in_reply_to":"1a930d6b_f1e23702","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        :param enable_ha: sets the ha value for the router."},{"line_number":494,"context_line":"        :param enable_snat:  the value of enable_snat is used"},{"line_number":495,"context_line":"        to  set the  agent_mode."},{"line_number":496,"context_line":"        :param enable_floating_ip: used to indicate weather or not"},{"line_number":497,"context_line":"        the router will have floating ips associated with it."},{"line_number":498,"context_line":"        \u0027\u0027\u0027"},{"line_number":499,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_51f14bcc","line":496,"updated":"2015-01-21 21:10:32.000000000","message":"(nit) weather -\u003e whether","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        # gateway_port information before the l3_agent will create it."},{"line_number":512,"context_line":"        # The port returned needs to have the same information as"},{"line_number":513,"context_line":"        # router_info[\u0027gw_port\u0027]"},{"line_number":514,"context_line":"        (l3_agent."},{"line_number":515,"context_line":"         L3PluginApi.return_value."},{"line_number":516,"context_line":"         get_agent_gateway_port.return_value) \u003d ("},{"line_number":517,"context_line":"            router_info[\u0027gw_port\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_91b653db","line":514,"updated":"2015-01-21 21:10:32.000000000","message":"This kind of formatting - surrounding the left-hand side with parentheses - is legal but not very unreadable.  Please use something like the following instead:\n\nmocked_gw_port \u003d (\n    l3_agent.L3PluginApi.return_value.get_agent_gateway_port)\nmocked_gw_port.return_value \u003d router_info[\u0027gw_port\u0027]","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        # gateway_port information before the l3_agent will create it."},{"line_number":512,"context_line":"        # The port returned needs to have the same information as"},{"line_number":513,"context_line":"        # router_info[\u0027gw_port\u0027]"},{"line_number":514,"context_line":"        (l3_agent."},{"line_number":515,"context_line":"         L3PluginApi.return_value."},{"line_number":516,"context_line":"         get_agent_gateway_port.return_value) \u003d ("},{"line_number":517,"context_line":"            router_info[\u0027gw_port\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_a334d7de","line":514,"in_reply_to":"1a930d6b_91b653db","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        # We also need to mock the get_external_network_id method to"},{"line_number":520,"context_line":"        # get the correct fip namespace."},{"line_number":521,"context_line":"        (l3_agent."},{"line_number":522,"context_line":"         L3PluginApi.return_value."},{"line_number":523,"context_line":"         get_external_network_id.return_value) \u003d ("},{"line_number":524,"context_line":"            router_info[\u0027_floatingips\u0027][0][\u0027floating_network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_f1b5d7cd","line":521,"updated":"2015-01-21 21:10:32.000000000","message":"Same comment as on line 514","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        # We also need to mock the get_external_network_id method to"},{"line_number":520,"context_line":"        # get the correct fip namespace."},{"line_number":521,"context_line":"        (l3_agent."},{"line_number":522,"context_line":"         L3PluginApi.return_value."},{"line_number":523,"context_line":"         get_external_network_id.return_value) \u003d ("},{"line_number":524,"context_line":"            router_info[\u0027_floatingips\u0027][0][\u0027floating_network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_c331e3ed","line":521,"in_reply_to":"1a930d6b_f1b5d7cd","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        if not enable_snat:"},{"line_number":561,"context_line":"            return router"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        # Add snat port information to the router"},{"line_number":564,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":565,"context_line":"        if not snat_port_list and internal_ports:"},{"line_number":566,"context_line":"            # Get values from internal port"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_11db43ee","line":563,"updated":"2015-01-21 21:10:32.000000000","message":"(No action required) Comments like this are usually a good indication of an opportunity to refactor.  Consider the following approach:\n\ndef generate_dvr_router_info(...):\n   ...\n   if enable_snat:\n     self._add_snat_port_info(router, internal_ports)\n   \n   return router\n\ndef _add_snat_port_info_to(self, router, internal_ports):\n   [lines 565-587]\n\nThis makes the code easier to read and maintain.","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        if not enable_snat:"},{"line_number":561,"context_line":"            return router"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        # Add snat port information to the router"},{"line_number":564,"context_line":"        snat_port_list \u003d router.get(l3_constants.SNAT_ROUTER_INTF_KEY, [])"},{"line_number":565,"context_line":"        if not snat_port_list and internal_ports:"},{"line_number":566,"context_line":"            # Get values from internal port"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_e305ffc2","line":563,"in_reply_to":"1a930d6b_11db43ee","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        # should not be present at all:"},{"line_number":603,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":604,"context_line":"            self.assertFalse("},{"line_number":605,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":606,"context_line":"                .exists(snat_ns_name),"},{"line_number":607,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":608,"context_line":"                % (str(snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_51fceb3e","line":605,"updated":"2015-01-21 21:10:32.000000000","message":"Please address my comment from the previous patch regarding refactoring self._namespace_exists for reuse.","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d60b21eb05a0087f59225a4b307353ac022e8472","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        # should not be present at all:"},{"line_number":603,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":604,"context_line":"            self.assertFalse("},{"line_number":605,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":606,"context_line":"                .exists(snat_ns_name),"},{"line_number":607,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":608,"context_line":"                % (str(snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_ace9361c","line":605,"in_reply_to":"1a930d6b_51fceb3e","updated":"2015-01-21 21:14:34.000000000","message":"+1","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        # should not be present at all:"},{"line_number":603,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":604,"context_line":"            self.assertFalse("},{"line_number":605,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":606,"context_line":"                .exists(snat_ns_name),"},{"line_number":607,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":608,"context_line":"                % (str(snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_072dc046","line":605,"in_reply_to":"1a930d6b_51fceb3e","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        # should not be present at all:"},{"line_number":603,"context_line":"        elif self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027:"},{"line_number":604,"context_line":"            self.assertFalse("},{"line_number":605,"context_line":"                ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":606,"context_line":"                .exists(snat_ns_name),"},{"line_number":607,"context_line":"                \"namespace %s was found but agent is in dvr mode not dvr_snat\""},{"line_number":608,"context_line":"                % (str(snat_ns_name))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_2310e700","line":605,"in_reply_to":"1a930d6b_51fceb3e","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        if gateway_expected_in_snat_namespace:"},{"line_number":620,"context_line":"            self._assert_dvr_snat_gateway(router)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"        snat_namespace_should_not_exists \u003d ("},{"line_number":623,"context_line":"            self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027"},{"line_number":624,"context_line":"        )"},{"line_number":625,"context_line":"        if snat_namespace_should_not_exists:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_d19ffb01","line":622,"updated":"2015-01-21 21:10:32.000000000","message":"(nit) exists -\u003e exist","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        if gateway_expected_in_snat_namespace:"},{"line_number":620,"context_line":"            self._assert_dvr_snat_gateway(router)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"        snat_namespace_should_not_exists \u003d ("},{"line_number":623,"context_line":"            self.agent.conf.agent_mode \u003d\u003d \u0027dvr\u0027"},{"line_number":624,"context_line":"        )"},{"line_number":625,"context_line":"        if snat_namespace_should_not_exists:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_e74b54ae","line":622,"in_reply_to":"1a930d6b_d19ffb01","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def _assert_snat_namespace_does_not_exist(self, router):"},{"line_number":642,"context_line":"        namespace \u003d self.agent.get_snat_ns_name(router.router_id)"},{"line_number":643,"context_line":"        self.assertFalse("},{"line_number":644,"context_line":"            ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":645,"context_line":"            .exists(namespace),"},{"line_number":646,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_115ee345","line":643,"updated":"2015-01-21 21:10:32.000000000","message":"As per my comment on the previous patchset, -\u003e self.assertFalse(_namespace_exists(namespace))","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def _assert_snat_namespace_does_not_exist(self, router):"},{"line_number":642,"context_line":"        namespace \u003d self.agent.get_snat_ns_name(router.router_id)"},{"line_number":643,"context_line":"        self.assertFalse("},{"line_number":644,"context_line":"            ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":645,"context_line":"            .exists(namespace),"},{"line_number":646,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_07c86021","line":643,"in_reply_to":"1a930d6b_115ee345","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"91f183435bc7899c81de41277ace7beadd34d1f3","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        # Check that the fg-\u003cport-id\u003e (floatingip_agent_gateway)"},{"line_number":651,"context_line":"        # is created with the ip address of the external gateway port"},{"line_number":652,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":653,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":656,"context_line":"        fip_ns_name \u003d ("}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_1177c3d5","line":653,"updated":"2015-01-21 21:10:32.000000000","message":"self.assertTrue automatically coerces a list via bool(), so self.assertTrue(floating_ips) is equivalent.  len() is only suggested when a specific non-zero value is expected in concert with self.assertEqual().","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d60b21eb05a0087f59225a4b307353ac022e8472","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        # Check that the fg-\u003cport-id\u003e (floatingip_agent_gateway)"},{"line_number":651,"context_line":"        # is created with the ip address of the external gateway port"},{"line_number":652,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":653,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":656,"context_line":"        fip_ns_name \u003d ("}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_8ce47a3c","line":653,"in_reply_to":"1a930d6b_1177c3d5","updated":"2015-01-21 21:14:34.000000000","message":"+1","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"5aab23bbb7df9f4ab2e3209f38fb5fdeaf226b9d","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        # Check that the fg-\u003cport-id\u003e (floatingip_agent_gateway)"},{"line_number":651,"context_line":"        # is created with the ip address of the external gateway port"},{"line_number":652,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":653,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":656,"context_line":"        fip_ns_name \u003d ("}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_67d764c2","line":653,"in_reply_to":"1a930d6b_1177c3d5","updated":"2015-01-22 09:01:53.000000000","message":"Done","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"a51515854cb77447b4634b67c5c7366049c2ca4c","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        # Check that the fg-\u003cport-id\u003e (floatingip_agent_gateway)"},{"line_number":651,"context_line":"        # is created with the ip address of the external gateway port"},{"line_number":652,"context_line":"        floating_ips \u003d router.router[l3_constants.FLOATINGIP_KEY]"},{"line_number":653,"context_line":"        self.assertTrue(len(floating_ips))"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"        external_port \u003d self.agent._get_ex_gw_port(router)"},{"line_number":656,"context_line":"        fip_ns_name \u003d ("}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_ec7c1e75","line":653,"in_reply_to":"1a930d6b_1177c3d5","updated":"2015-01-21 21:12:29.000000000","message":"oops, this should have been prefixed with (No action required)","commit_id":"5ade54c519d7d5c326e4228fa11129aaabcf9507"}]}
