)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":17,"context_line":"determining the namespace for a specific router.  Without this API object, the"},{"line_number":18,"context_line":"L3 agent extension would not have access to this structure."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Co-Authored-By: Margaret Frances \u003cmargaret_frances@cable.comcast.com\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I85f89accbeefd820130335674fd56cb54f1449de"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_61b8b7e6","line":20,"updated":"2016-08-31 11:31:26.000000000","message":"DocImpact to cover the feature in devref.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"determining the namespace for a specific router.  Without this API object, the"},{"line_number":18,"context_line":"L3 agent extension would not have access to this structure."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Co-Authored-By: Margaret Frances \u003cmargaret_frances@cable.comcast.com\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I85f89accbeefd820130335674fd56cb54f1449de"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_0158c855","line":20,"in_reply_to":"fa7ab95a_61b8b7e6","updated":"2016-08-31 12:08:49.000000000","message":"Will add.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Co-Authored-By: Margaret Frances \u003cmargaret_frances@cable.comcast.com\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I85f89accbeefd820130335674fd56cb54f1449de"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_e15127da","line":22,"updated":"2016-08-31 11:31:26.000000000","message":"No blueprint?","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Co-Authored-By: Margaret Frances \u003cmargaret_frances@cable.comcast.com\u003e"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I85f89accbeefd820130335674fd56cb54f1449de"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_841f865a","line":22,"in_reply_to":"fa7ab95a_e15127da","updated":"2016-08-31 12:08:49.000000000","message":"Will add reference to it.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"}],"doc/source/devref/agent_extensions.rst":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bb6210a1a2c66a70a577790835b273abe662af15","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"The relevant modules are:"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"* neutron.agent.l2.agent_extension_api:"},{"line_number":102,"context_line":"* neutron.agent.l3.agent_extension_api:"}],"source_content_type":"text/x-rst","patch_set":17,"id":"fa7ab95a_f91f14b5","line":101,"updated":"2016-08-31 14:16:12.000000000","message":"Probably : at the end here and below are not needed.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"d8f8183c8f700fb4d799fe04ccebd27da50e2b5c","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"The relevant modules are:"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"* neutron.agent.l2.agent_extension_api:"},{"line_number":102,"context_line":"* neutron.agent.l3.agent_extension_api:"}],"source_content_type":"text/x-rst","patch_set":17,"id":"fa7ab95a_d9509061","line":101,"in_reply_to":"fa7ab95a_f91f14b5","updated":"2016-08-31 15:16:57.000000000","message":"Done.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"}],"neutron/agent/l3/l3_agent_extension.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"2a85257319dbc3652dd988088c74c3df6a25f9e2","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":23,"context_line":"class L3AgentCoreResourceExtension(agent_extension.AgentExtension):"},{"line_number":24,"context_line":"    \"\"\"Define stable abstract interface for l3 agent extensions."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    An agent extension extends the agent core functionality."}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_3427a865","line":23,"updated":"2016-08-26 19:16:16.000000000","message":"Fixing this to test the code.","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"}],"neutron/agent/l3/l3_agent_extension_api.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"64ca7d14beb9c1a8890cb9e885e5a5184834ae6e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    Extensions can gain access to this API by overriding the consume_api"},{"line_number":22,"context_line":"    method which has been added to the AgentCoreResourceExtension class."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    The purpose of this API is to give L3 agent extensions access to the "},{"line_number":25,"context_line":"    RouterInfo object."},{"line_number":26,"context_line":"    \u0027\u0027\u0027"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac371cc_35854fad","line":24,"range":{"start_line":24,"start_character":72,"end_line":24,"end_character":73},"updated":"2016-08-18 21:39:53.000000000","message":"trailing whitespace","commit_id":"341528108b7ba92bf7c512f61b9d4b97a6fce0ba"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"92f0aa3f99832007033025c8efacd5dd328c4348","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \u0027\u0027\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, router_info):"},{"line_number":28,"context_line":"        self.router_info \u003d router_info"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def request_router_info(self):"},{"line_number":31,"context_line":"        \"\"\"Allows extensions to request a RouterInfo object to use to"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_553941f1","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":24},"updated":"2016-08-23 14:30:41.000000000","message":"Since there is a getter method would self._router_info be better?","commit_id":"8ebbb5cadcdd5cda6a6729067e4994c06f19c15a"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"76bc787e117dd350645e0763f67a44f0066ad1a5","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \u0027\u0027\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, router_info):"},{"line_number":28,"context_line":"        self.router_info \u003d router_info"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def request_router_info(self):"},{"line_number":31,"context_line":"        \"\"\"Allows extensions to request a RouterInfo object to use to"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_beafad7b","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":24},"in_reply_to":"1ac06dbe_1bfed3ad","updated":"2016-08-23 15:06:29.000000000","message":"Oh, wait - you know what, I misread the context of your comments.  \n\nSure, I can make that change.","commit_id":"8ebbb5cadcdd5cda6a6729067e4994c06f19c15a"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"9a8156b4bf90a424d658e1656666f34f317523c5","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \u0027\u0027\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, router_info):"},{"line_number":28,"context_line":"        self.router_info \u003d router_info"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def request_router_info(self):"},{"line_number":31,"context_line":"        \"\"\"Allows extensions to request a RouterInfo object to use to"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_9c7c7eb6","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":24},"in_reply_to":"1ac06dbe_553941f1","updated":"2016-08-23 14:49:16.000000000","message":"I believe the leading underscore indicate that _router_info is a non-public method.  So it would be bad form to call it from another object, right?  https://www.python.org/dev/peps/pep-0008/#method-names-and-instance-variables","commit_id":"8ebbb5cadcdd5cda6a6729067e4994c06f19c15a"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"5bf86618573de0773a94e442390aade4dd1e1f6c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \u0027\u0027\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, router_info):"},{"line_number":28,"context_line":"        self.router_info \u003d router_info"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def request_router_info(self):"},{"line_number":31,"context_line":"        \"\"\"Allows extensions to request a RouterInfo object to use to"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_1bfed3ad","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":24},"in_reply_to":"1ac06dbe_9c7c7eb6","updated":"2016-08-23 14:58:02.000000000","message":"Exactly, it would just make it explicit that the getter should be used rather than trying to access the variable directly.","commit_id":"8ebbb5cadcdd5cda6a6729067e4994c06f19c15a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ea37ea146ef9dae942c6a575e44fb514a3e4c501","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def __init__(self, router_info):"},{"line_number":28,"context_line":"        self._router_info \u003d router_info"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def request_router_info(self):"},{"line_number":31,"context_line":"        \"\"\"Allows extensions to request a RouterInfo object to use to"},{"line_number":32,"context_line":"        look up router namespaces etc."},{"line_number":33,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_067006a3","line":30,"updated":"2016-08-24 09:21:52.000000000","message":"Is it the best API we could do? Couldn\u0027t we receive an argument (router_id) to extract the needed RouterInfo for the caller? Or do you think that there is a use case to access all of routers in one call?","commit_id":"6ec96a2688ca436f7978151f92e3b8724c8c72c1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8245a62cd92341a1ba17b2c7b72982b837baac6e","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_routers_in_ns_ports(self, port_ids):"},{"line_number":38,"context_line":"        \"\"\"Given an array of port_ids, looks up the router associated with that"},{"line_number":39,"context_line":"        port (if any) that is the local namespace, and returns an array of"},{"line_number":40,"context_line":"        both RouterInfo and the matching ports."},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        in_ns_ports \u003d []"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_d0daf6e8","line":39,"range":{"start_line":39,"start_character":22,"end_line":39,"end_character":49},"updated":"2016-08-24 20:51:58.000000000","message":"I don\u0027t understand this.","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"e0d52b4931846a4f9f574ca73db9cf3d592d9b30","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_routers_in_ns_ports(self, port_ids):"},{"line_number":38,"context_line":"        \"\"\"Given an array of port_ids, looks up the router associated with that"},{"line_number":39,"context_line":"        port (if any) that is the local namespace, and returns an array of"},{"line_number":40,"context_line":"        both RouterInfo and the matching ports."},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        in_ns_ports \u003d []"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_c27ca374","line":39,"range":{"start_line":39,"start_character":22,"end_line":39,"end_character":49},"in_reply_to":"1ac06dbe_d0daf6e8","updated":"2016-08-25 19:15:24.000000000","message":"Should have said \"in the local namespace\" - the \"in\" was missing.  I reworded anyway.","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8245a62cd92341a1ba17b2c7b72982b837baac6e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def get_routers_in_ns_ports(self, port_ids):"},{"line_number":38,"context_line":"        \"\"\"Given an array of port_ids, looks up the router associated with that"},{"line_number":39,"context_line":"        port (if any) that is the local namespace, and returns an array of"},{"line_number":40,"context_line":"        both RouterInfo and the matching ports."},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        in_ns_ports \u003d []"},{"line_number":43,"context_line":"        local_namespaces \u003d self._local_namespaces()"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_fba9d37c","line":40,"updated":"2016-08-24 20:51:58.000000000","message":"This seems to be a very specialize interface. What if the agent provide a port -\u003e router_info mapping and we optimized it inside of the agent?","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"e0d52b4931846a4f9f574ca73db9cf3d592d9b30","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def get_routers_in_ns_ports(self, port_ids):"},{"line_number":38,"context_line":"        \"\"\"Given an array of port_ids, looks up the router associated with that"},{"line_number":39,"context_line":"        port (if any) that is the local namespace, and returns an array of"},{"line_number":40,"context_line":"        both RouterInfo and the matching ports."},{"line_number":41,"context_line":"        \"\"\""},{"line_number":42,"context_line":"        in_ns_ports \u003d []"},{"line_number":43,"context_line":"        local_namespaces \u003d self._local_namespaces()"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_a27fe764","line":40,"in_reply_to":"1ac06dbe_fba9d37c","updated":"2016-08-25 19:15:24.000000000","message":"Done","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8245a62cd92341a1ba17b2c7b72982b837baac6e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":44,"context_line":"        if port_ids:"},{"line_number":45,"context_line":"            for router_id in self._router_info:"},{"line_number":46,"context_line":"                # For routers without an interface - get_routers returns"},{"line_number":47,"context_line":"                # the router - but this is not yet populated in router_info"},{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_10580e56","line":47,"range":{"start_line":46,"start_character":0,"end_line":47,"end_character":75},"updated":"2016-08-24 20:51:58.000000000","message":"Should this comment be moved down one line?","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"e0d52b4931846a4f9f574ca73db9cf3d592d9b30","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":44,"context_line":"        if port_ids:"},{"line_number":45,"context_line":"            for router_id in self._router_info:"},{"line_number":46,"context_line":"                # For routers without an interface - get_routers returns"},{"line_number":47,"context_line":"                # the router - but this is not yet populated in router_info"},{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_42fd5339","line":47,"range":{"start_line":46,"start_character":0,"end_line":47,"end_character":75},"in_reply_to":"1ac06dbe_10580e56","updated":"2016-08-25 19:15:24.000000000","message":"Done","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8245a62cd92341a1ba17b2c7b72982b837baac6e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            for router_id in self._router_info:"},{"line_number":46,"context_line":"                # For routers without an interface - get_routers returns"},{"line_number":47,"context_line":"                # the router - but this is not yet populated in router_info"},{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"},{"line_number":51,"context_line":"                in_ns_router_port_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_5049e68d","line":48,"range":{"start_line":48,"start_character":16,"end_line":48,"end_character":58},"updated":"2016-08-24 20:51:58.000000000","message":"Why not just iterate the values directly. Something like this:\n\n  routers \u003d [ri for ri in self._router_info.values() if ri.ns_name in local_namespaces]\n  for router_info in routers:","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"e0d52b4931846a4f9f574ca73db9cf3d592d9b30","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            for router_id in self._router_info:"},{"line_number":46,"context_line":"                # For routers without an interface - get_routers returns"},{"line_number":47,"context_line":"                # the router - but this is not yet populated in router_info"},{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"},{"line_number":51,"context_line":"                in_ns_router_port_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_02035b43","line":48,"range":{"start_line":48,"start_character":16,"end_line":48,"end_character":58},"in_reply_to":"1ac06dbe_5049e68d","updated":"2016-08-25 19:15:24.000000000","message":"Great idea.  Done.","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8245a62cd92341a1ba17b2c7b72982b837baac6e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                # For routers without an interface - get_routers returns"},{"line_number":47,"context_line":"                # the router - but this is not yet populated in router_info"},{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"},{"line_number":51,"context_line":"                in_ns_router_port_ids \u003d []"},{"line_number":52,"context_line":"                for port in router_info.internal_ports:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_d001563b","line":49,"range":{"start_line":49,"start_character":39,"end_line":49,"end_character":62},"updated":"2016-08-24 20:51:58.000000000","message":"If you\u0027re going to do a \"not in\" repeatedly on this then it should probably be a set for efficiency. Not a list. I\u0027ve seen hundreds of namespaces on a machine and hundreds of routers.","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"e0d52b4931846a4f9f574ca73db9cf3d592d9b30","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                # For routers without an interface - get_routers returns"},{"line_number":47,"context_line":"                # the router - but this is not yet populated in router_info"},{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"},{"line_number":51,"context_line":"                in_ns_router_port_ids \u003d []"},{"line_number":52,"context_line":"                for port in router_info.internal_ports:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_a20fe786","line":49,"range":{"start_line":49,"start_character":39,"end_line":49,"end_character":62},"in_reply_to":"1ac06dbe_d001563b","updated":"2016-08-25 19:15:24.000000000","message":"Done; I turned it into a set in the _local_namespaces() function.","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8245a62cd92341a1ba17b2c7b72982b837baac6e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"},{"line_number":51,"context_line":"                in_ns_router_port_ids \u003d []"},{"line_number":52,"context_line":"                for port in router_info.internal_ports:"},{"line_number":53,"context_line":"                    if port[\u0027id\u0027] in port_ids:"},{"line_number":54,"context_line":"                        in_ns_router_port_ids.append(port[\u0027id\u0027])"},{"line_number":55,"context_line":"                if in_ns_router_port_ids:"},{"line_number":56,"context_line":"                    in_ns_ports.append((router_info, in_ns_router_port_ids))"},{"line_number":57,"context_line":"        return in_ns_ports"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_9bb37f0a","line":54,"range":{"start_line":51,"start_character":16,"end_line":54,"end_character":64},"updated":"2016-08-24 20:51:58.000000000","message":"This is a good candidate for a list comprehension.\n\n  in_ns_router_port_ids \u003d [port[\u0027id\u0027] for port in router_info.internal_ports\n                           if port[\u0027id\u0027] in port_ids]","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"e0d52b4931846a4f9f574ca73db9cf3d592d9b30","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                router_info \u003d self._router_info[router_id]"},{"line_number":49,"context_line":"                if router_info.ns_name not in local_namespaces:"},{"line_number":50,"context_line":"                    continue"},{"line_number":51,"context_line":"                in_ns_router_port_ids \u003d []"},{"line_number":52,"context_line":"                for port in router_info.internal_ports:"},{"line_number":53,"context_line":"                    if port[\u0027id\u0027] in port_ids:"},{"line_number":54,"context_line":"                        in_ns_router_port_ids.append(port[\u0027id\u0027])"},{"line_number":55,"context_line":"                if in_ns_router_port_ids:"},{"line_number":56,"context_line":"                    in_ns_ports.append((router_info, in_ns_router_port_ids))"},{"line_number":57,"context_line":"        return in_ns_ports"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_c29f8301","line":54,"range":{"start_line":51,"start_character":16,"end_line":54,"end_character":64},"in_reply_to":"1ac06dbe_9bb37f0a","updated":"2016-08-25 19:15:24.000000000","message":"Unneeded because of the simplification of the API to do single values instead of bulk fetches.","commit_id":"200ef59a56f4a2651051c259efd88b09998fc896"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2d1839d6cf1ddaf4408eafa125588d625723035a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        local_ns_list \u003d root_ip.get_namespaces()"},{"line_number":35,"context_line":"        return set(local_ns_list)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_router_from_port_id(self, port_id):"},{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_ab5eebe6","line":37,"updated":"2016-08-27 00:23:30.000000000","message":"I think this is a little bit better than the previous one in terms of the interface. Do you think it would be worth it to add a data structure to optimize it a little bit. Or, do you think this will perform sufficiently well?","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"1d98966732969cebd155fb9c83ed4de6ed12c23f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        local_ns_list \u003d root_ip.get_namespaces()"},{"line_number":35,"context_line":"        return set(local_ns_list)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_router_from_port_id(self, port_id):"},{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_5e919451","line":37,"in_reply_to":"fa7ab95a_ab5eebe6","updated":"2016-08-27 15:03:57.000000000","message":"I thought about a data structure that would provide a port id to router mapping, but the difficulty there is keeping it in sync with the router_info data as it gets updated, and seems more intrusive than is necessary for this case.","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2d1839d6cf1ddaf4408eafa125588d625723035a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        in_ns_port \u003d \"\""},{"line_number":42,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":43,"context_line":"        if port_id:"},{"line_number":44,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_4b6e3f97","line":41,"updated":"2016-08-27 00:23:30.000000000","message":"It seems very odd to use a string here. None is usually what would be used to represent the lack of an instance.","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"1d98966732969cebd155fb9c83ed4de6ed12c23f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        in_ns_port \u003d \"\""},{"line_number":42,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":43,"context_line":"        if port_id:"},{"line_number":44,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_9eba3c09","line":41,"in_reply_to":"fa7ab95a_4b6e3f97","updated":"2016-08-27 15:03:57.000000000","message":"Done","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2d1839d6cf1ddaf4408eafa125588d625723035a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":43,"context_line":"        if port_id:"},{"line_number":44,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":45,"context_line":"                    if ri.ns_name in local_namespaces]"},{"line_number":46,"context_line":"            for router_info in routers:"},{"line_number":47,"context_line":"                for port in router_info.internal_ports:"},{"line_number":48,"context_line":"                    if port[\u0027id\u0027] \u003d\u003d port_id:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_eb7c7374","line":45,"range":{"start_line":45,"start_character":20,"end_line":45,"end_character":23},"updated":"2016-08-27 00:23:30.000000000","message":"nit: Usually these line up just after the [ on the line above (i.e. indent 3 more spaces).","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"1d98966732969cebd155fb9c83ed4de6ed12c23f","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":43,"context_line":"        if port_id:"},{"line_number":44,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":45,"context_line":"                    if ri.ns_name in local_namespaces]"},{"line_number":46,"context_line":"            for router_info in routers:"},{"line_number":47,"context_line":"                for port in router_info.internal_ports:"},{"line_number":48,"context_line":"                    if port[\u0027id\u0027] \u003d\u003d port_id:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_5e47d41c","line":45,"range":{"start_line":45,"start_character":20,"end_line":45,"end_character":23},"in_reply_to":"fa7ab95a_eb7c7374","updated":"2016-08-27 15:03:57.000000000","message":"Huh, I wonder why pep8 didn\u0027t catch that.  Done.","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2d1839d6cf1ddaf4408eafa125588d625723035a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            for router_info in routers:"},{"line_number":47,"context_line":"                for port in router_info.internal_ports:"},{"line_number":48,"context_line":"                    if port[\u0027id\u0027] \u003d\u003d port_id:"},{"line_number":49,"context_line":"                        in_ns_port \u003d router_info"},{"line_number":50,"context_line":"        return in_ns_port"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_ab050bc3","line":49,"updated":"2016-08-27 00:23:30.000000000","message":"Do you need to keep looking? Why not just return router_info directly from here?\n\n    def get_router_from_port_id(self, port_id):\n        \"\"\"Given a port_id, look up the router associated with that port in\n        local namespace. Returns a RouterInfo object.\n        \"\"\"\n        local_namespaces \u003d self._local_namespaces()\n        if port_id:\n            routers \u003d [ri for ri in self._router_info.values()\n                       if ri.ns_name in local_namespaces]\n            for router_info in routers:\n                for port in router_info.internal_ports:\n                    if port[\u0027id\u0027] \u003d\u003d port_id:\n                        return router_info","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"1d98966732969cebd155fb9c83ed4de6ed12c23f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            for router_info in routers:"},{"line_number":47,"context_line":"                for port in router_info.internal_ports:"},{"line_number":48,"context_line":"                    if port[\u0027id\u0027] \u003d\u003d port_id:"},{"line_number":49,"context_line":"                        in_ns_port \u003d router_info"},{"line_number":50,"context_line":"        return in_ns_port"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_de6124aa","line":49,"in_reply_to":"fa7ab95a_ab050bc3","updated":"2016-08-27 15:03:57.000000000","message":"Good idea.  Done.","commit_id":"662b563f6799adf40785a4d211c97b1bbdd878d5"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"06435bab110733d8aa293edfce6b1d8496555730","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"},{"line_number":43,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":44,"context_line":"                if ri.ns_name in local_namespaces]"},{"line_number":45,"context_line":"            for router_info in routers:"},{"line_number":46,"context_line":"                for port in router_info.internal_ports:"},{"line_number":47,"context_line":"                    if port[\u0027id\u0027] \u003d\u003d port_id:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_4d3ddec2","line":44,"range":{"start_line":44,"start_character":16,"end_line":44,"end_character":23},"updated":"2016-08-30 16:01:08.000000000","message":"nit: odd indentation. Often these are lined up with the open bracket (i.e. 7 spaces to the right. This isn\u0027t a -1 because I think it is pep8\u0027s job to -1 this kind of thing. But, it is nice to follow convention.","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"a67350040a6028edd87f24ee6132c44abaf9a4f7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"},{"line_number":43,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":44,"context_line":"                if ri.ns_name in local_namespaces]"},{"line_number":45,"context_line":"            for router_info in routers:"},{"line_number":46,"context_line":"                for port in router_info.internal_ports:"},{"line_number":47,"context_line":"                    if port[\u0027id\u0027] \u003d\u003d port_id:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_ed307258","line":44,"range":{"start_line":44,"start_character":16,"end_line":44,"end_character":23},"in_reply_to":"fa7ab95a_4d3ddec2","updated":"2016-08-30 16:06:20.000000000","message":"Done","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"06435bab110733d8aa293edfce6b1d8496555730","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return an array of routers that are all in"},{"line_number":52,"context_line":"        the given project."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [self._router_info[rid] for rid in self._router_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_8d8fe673","line":52,"updated":"2016-08-30 16:01:08.000000000","message":"Returns None if no project_id is provided.","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"a67350040a6028edd87f24ee6132c44abaf9a4f7","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return an array of routers that are all in"},{"line_number":52,"context_line":"        the given project."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [self._router_info[rid] for rid in self._router_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_cd2d6eff","line":52,"in_reply_to":"fa7ab95a_8d8fe673","updated":"2016-08-30 16:06:20.000000000","message":"Done","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"06435bab110733d8aa293edfce6b1d8496555730","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        the given project."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [self._router_info[rid] for rid in self._router_info"},{"line_number":56,"context_line":"                if self._router_info[rid].router[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def router_in_ns(self, router_id):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_dbd52be5","line":55,"updated":"2016-08-30 16:01:08.000000000","message":"This would look a lot better iterating values:\n\n  [ri for ri in self._router_info.values() if ri.router[\u0027project_id\u0027] \u003d\u003d project_id]","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"a67350040a6028edd87f24ee6132c44abaf9a4f7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        the given project."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [self._router_info[rid] for rid in self._router_info"},{"line_number":56,"context_line":"                if self._router_info[rid].router[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def router_in_ns(self, router_id):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_ed1792a0","line":55,"in_reply_to":"fa7ab95a_dbd52be5","updated":"2016-08-30 16:06:20.000000000","message":"Very nice. Done.","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"06435bab110733d8aa293edfce6b1d8496555730","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [self._router_info[rid] for rid in self._router_info"},{"line_number":56,"context_line":"                if self._router_info[rid].router[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def router_in_ns(self, router_id):"},{"line_number":59,"context_line":"        \"\"\"Given a router_id, make sure that the router is in a local"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_5b84bb09","line":56,"updated":"2016-08-30 16:01:08.000000000","message":"This returns None if \"not project_id\". Would you rather return []?","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"a67350040a6028edd87f24ee6132c44abaf9a4f7","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [self._router_info[rid] for rid in self._router_info"},{"line_number":56,"context_line":"                if self._router_info[rid].router[\u0027project_id\u0027] \u003d\u003d project_id]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def router_in_ns(self, router_id):"},{"line_number":59,"context_line":"        \"\"\"Given a router_id, make sure that the router is in a local"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_0d82f6c7","line":56,"in_reply_to":"fa7ab95a_5b84bb09","updated":"2016-08-30 16:06:20.000000000","message":"Sure, that makes sense.  Done.","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"06435bab110733d8aa293edfce6b1d8496555730","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        namespace."},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":63,"context_line":"        return router_id in self._router_info and \\"},{"line_number":64,"context_line":"            self._router_info[router_id].ns_name in \\"},{"line_number":65,"context_line":"            local_namespaces"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_fb62ef3c","line":63,"range":{"start_line":63,"start_character":50,"end_line":63,"end_character":51},"updated":"2016-08-30 16:01:08.000000000","message":"nit: We prefer not to use \\ to continue a line. If you surround the entire statement with parenthesis then you can break lines.\n\n  return (routed_id in self._routed_info and ... )\n\nYou might also consider breaking it up for readability.\n\n  ri \u003d self._router_info.get(routed_id)\n  return ri and ri.ns_name in local_namespaces","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"a67350040a6028edd87f24ee6132c44abaf9a4f7","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        namespace."},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":63,"context_line":"        return router_id in self._router_info and \\"},{"line_number":64,"context_line":"            self._router_info[router_id].ns_name in \\"},{"line_number":65,"context_line":"            local_namespaces"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_6df62290","line":63,"range":{"start_line":63,"start_character":50,"end_line":63,"end_character":51},"in_reply_to":"fa7ab95a_fb62ef3c","updated":"2016-08-30 16:06:20.000000000","message":"Done","commit_id":"0ea64aa70dc13effff8817a68b7a3ae5698135e6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        local_ns_list \u003d root_ip.get_namespaces()"},{"line_number":35,"context_line":"        return set(local_ns_list)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_router_from_port_id(self, port_id):"},{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_3cfdf86e","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":31},"updated":"2016-08-31 11:31:26.000000000","message":"get_router_hosting_port?","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"de7b75fb563d830df48cbc062c93cdde96505e88","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        local_ns_list \u003d root_ip.get_namespaces()"},{"line_number":35,"context_line":"        return set(local_ns_list)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_router_from_port_id(self, port_id):"},{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_87406809","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":31},"in_reply_to":"fa7ab95a_1e4669bf","updated":"2016-08-31 12:17:02.000000000","message":"Nate just pointed out my error here.  I was being stupid.  Will fix method name as you suggest.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        local_ns_list \u003d root_ip.get_namespaces()"},{"line_number":35,"context_line":"        return set(local_ns_list)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_router_from_port_id(self, port_id):"},{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_1e4669bf","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":31},"in_reply_to":"fa7ab95a_3cfdf86e","updated":"2016-08-31 12:08:49.000000000","message":"Well, we\u0027re not returning the hosting port itself, right, but the router_info associated with the hosting port.  Will change method name to get_router_from_hosting_port unless you see that I\u0027m missing something here.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_router_from_port_id(self, port_id):"},{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_e18f67ca","line":39,"updated":"2016-08-31 11:31:26.000000000","message":"...or None, when the router is not found.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def get_router_from_port_id(self, port_id):"},{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_fe48e5ce","line":39,"in_reply_to":"fa7ab95a_e18f67ca","updated":"2016-08-31 12:08:49.000000000","message":"Will add.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"},{"line_number":43,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":44,"context_line":"                      if ri.ns_name in local_namespaces]"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_e1a9277d","line":41,"updated":"2016-08-31 11:31:26.000000000","message":"nit: seems like this line could go after line 42.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Given a port_id, look up the router associated with that port in"},{"line_number":39,"context_line":"        local namespace. Returns a RouterInfo object."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"},{"line_number":43,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":44,"context_line":"                      if ri.ns_name in local_namespaces]"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_5e1631a8","line":41,"in_reply_to":"fa7ab95a_e1a9277d","updated":"2016-08-31 12:08:49.000000000","message":"I agree.  Will move.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"},{"line_number":43,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":44,"context_line":"                      if ri.ns_name in local_namespaces]"},{"line_number":45,"context_line":"            for router_info in routers:"},{"line_number":46,"context_line":"                for port in router_info.internal_ports:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_61d517b8","line":43,"updated":"2016-08-31 11:31:26.000000000","message":"we could avoid calculation of the whole list if it would not be a list comprehension but an iterator. Consider replacing lines 42-46 with:\n\nfor router_info in self._router_info.values():\n    if router_info.ns_name in local_namespaces:\n        ...","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":42,"context_line":"        if port_id:"},{"line_number":43,"context_line":"            routers \u003d [ri for ri in self._router_info.values()"},{"line_number":44,"context_line":"                      if ri.ns_name in local_namespaces]"},{"line_number":45,"context_line":"            for router_info in routers:"},{"line_number":46,"context_line":"                for port in router_info.internal_ports:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_be257d0b","line":43,"in_reply_to":"fa7ab95a_61d517b8","updated":"2016-08-31 12:08:49.000000000","message":"Thanks.  Will change.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                        return router_info"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return an array of routers that are all in"},{"line_number":52,"context_line":"        the given project.  Returns None if no project_id is provided."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_a1739fe6","line":51,"range":{"start_line":51,"start_character":41,"end_line":51,"end_character":46},"updated":"2016-08-31 11:31:26.000000000","message":"in python, it\u0027s more common to name [] as list not array.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                        return router_info"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return an array of routers that are all in"},{"line_number":52,"context_line":"        the given project.  Returns None if no project_id is provided."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_de224101","line":51,"range":{"start_line":51,"start_character":41,"end_line":51,"end_character":46},"in_reply_to":"fa7ab95a_a1739fe6","updated":"2016-08-31 12:08:49.000000000","message":"Yes, will change.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return an array of routers that are all in"},{"line_number":52,"context_line":"        the given project.  Returns None if no project_id is provided."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [ri for ri in self._router_info.values()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_fcfd5009","line":52,"range":{"start_line":52,"start_character":28,"end_line":52,"end_character":70},"updated":"2016-08-31 11:31:26.000000000","message":"It\u0027s not ideal wording. You can\u0027t avoid passing project_id because the argument is required. I think what you mean is: \u0027Returns None on unknown project_id.\u0027 And also, the way the code is written right now, it does not return None at all, it\u0027s always a list (which seems right, so probably docstring should just be updated to reflect the behaviour).","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return an array of routers that are all in"},{"line_number":52,"context_line":"        the given project.  Returns None if no project_id is provided."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if project_id:"},{"line_number":55,"context_line":"            return [ri for ri in self._router_info.values()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_e164c4e6","line":52,"range":{"start_line":52,"start_character":28,"end_line":52,"end_character":70},"in_reply_to":"fa7ab95a_fcfd5009","updated":"2016-08-31 12:08:49.000000000","message":"I think the falsity of\n\n   if project_id\n\nisn\u0027t an unknown project_id, but a project_id with a false truthiness.  I think the phrase \"if no project_id is provided\" is ambiguous.  I considered making project_id optional to address this, but that\u0027s silly.  Will fix wording.\n\nWill also fix the phrasing of \"returns None\" to reflect that a list is being returned.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        else:"},{"line_number":58,"context_line":"            return []"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def router_in_ns(self, router_id):"},{"line_number":61,"context_line":"        \"\"\"Given a router_id, make sure that the router is in a local"},{"line_number":62,"context_line":"        namespace."},{"line_number":63,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_dcd7aceb","line":60,"updated":"2016-08-31 11:31:26.000000000","message":"please rename into router_in_namespace or maybe even is_router_in_namespace. I believe since it\u0027s public API, function names should be more explicit and clear.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        else:"},{"line_number":58,"context_line":"            return []"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def router_in_ns(self, router_id):"},{"line_number":61,"context_line":"        \"\"\"Given a router_id, make sure that the router is in a local"},{"line_number":62,"context_line":"        namespace."},{"line_number":63,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_0190c894","line":60,"in_reply_to":"fa7ab95a_dcd7aceb","updated":"2016-08-31 12:08:49.000000000","message":"Good.  Will change to \n\n   is_router_in_namespace","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":65,"context_line":"        ri \u003d self._router_info[router_id].ns_name"},{"line_number":66,"context_line":"        return router_id in self._router_info and ri in local_namespaces"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_3cdc1846","line":66,"range":{"start_line":66,"start_character":15,"end_line":66,"end_character":45},"updated":"2016-08-31 11:31:26.000000000","message":"You already checked that in line 65, by extracting the value.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":65,"context_line":"        ri \u003d self._router_info[router_id].ns_name"},{"line_number":66,"context_line":"        return router_id in self._router_info and ri in local_namespaces"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_616274af","line":66,"range":{"start_line":66,"start_character":15,"end_line":66,"end_character":45},"in_reply_to":"fa7ab95a_3cdc1846","updated":"2016-08-31 12:08:49.000000000","message":"Well, line 65 will produce an exception if router_id isn\u0027t a key of self._router_info.  So I\u0027ll fix this up.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0f5cbd5bf58ffd6e932b75048c5ce8cb1c36857f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return a list of routers that are all in"},{"line_number":52,"context_line":"        the given project.  Returns empty list if the project_id provided"},{"line_number":53,"context_line":"        doesn\u0027t evaluate to True."},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        if project_id:"},{"line_number":56,"context_line":"            return [ri for ri in self._router_info.values()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_d96ed095","line":53,"updated":"2016-08-31 14:15:13.000000000","message":"a bit too technical, but I guess it\u0027s ok for now, we can refine it later if need be.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"d8f8183c8f700fb4d799fe04ccebd27da50e2b5c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def get_routers_in_project(self, project_id):"},{"line_number":51,"context_line":"        \"\"\"Given a project_id, return a list of routers that are all in"},{"line_number":52,"context_line":"        the given project.  Returns empty list if the project_id provided"},{"line_number":53,"context_line":"        doesn\u0027t evaluate to True."},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        if project_id:"},{"line_number":56,"context_line":"            return [ri for ri in self._router_info.values()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_19a75850","line":53,"in_reply_to":"fa7ab95a_d96ed095","updated":"2016-08-31 15:16:57.000000000","message":"Yeah, you\u0027re right.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0f5cbd5bf58ffd6e932b75048c5ce8cb1c36857f","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        namespace."},{"line_number":64,"context_line":"        \"\"\""},{"line_number":65,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":66,"context_line":"        ri \u003d self._router_info.get(router_id, None)"},{"line_number":67,"context_line":"        return ri and ri.ns_name in local_namespaces"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_f902b4b3","line":66,"updated":"2016-08-31 14:15:13.000000000","message":"nit: I think None is default for .get on missing key, could be removed.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"d8f8183c8f700fb4d799fe04ccebd27da50e2b5c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        namespace."},{"line_number":64,"context_line":"        \"\"\""},{"line_number":65,"context_line":"        local_namespaces \u003d self._local_namespaces()"},{"line_number":66,"context_line":"        ri \u003d self._router_info.get(router_id, None)"},{"line_number":67,"context_line":"        return ri and ri.ns_name in local_namespaces"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_79b5c47c","line":66,"in_reply_to":"fa7ab95a_f902b4b3","updated":"2016-08-31 15:16:57.000000000","message":"Yeah, it is None.  Will fix.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"}],"neutron/tests/unit/agent/l3/test_l3_agent_extension_api.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"64ca7d14beb9c1a8890cb9e885e5a5184834ae6e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3ac371cc_35feef38","line":26,"updated":"2016-08-18 21:39:53.000000000","message":"I know more goes here, but I want to suss out the pattern of data that FWaaS will need and then fetch that pattern.","commit_id":"341528108b7ba92bf7c512f61b9d4b97a6fce0ba"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"7d83ce1be2fb50a13881b812f1e9d09831d68d62","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \u0027routes\u0027: [],"},{"line_number":55,"context_line":"            \u0027gw_port\u0027: ex_gw_port}"},{"line_number":56,"context_line":"        ri \u003d l3router.RouterInfo(ns_id, router, **self.ri_kwargs)"},{"line_number":57,"context_line":"        self.assertTrue(ri.ns_name.endswith(ns_id))"},{"line_number":58,"context_line":"        self.assertEqual(router, ri.router)"},{"line_number":59,"context_line":"\t# TODO(njohnston): Mock L3NATAgent to pass to"},{"line_number":60,"context_line":"\t# l3_agent_api.L3AgentExtensionAPI"},{"line_number":61,"context_line":"        api_object \u003d l3_agent_api.L3AgentExtensionAPI()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ac06dbe_34f7d9f6","line":58,"range":{"start_line":57,"start_character":18,"end_line":58,"end_character":23},"updated":"2016-08-21 13:12:40.000000000","message":"These are tests of l3router rather than of the api; not sure they should be here.","commit_id":"e64835741c532914c5db913384f07f6052906fc9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ea37ea146ef9dae942c6a575e44fb514a3e4c501","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        agent_config.register_interface_driver_opts_helper(self.conf)"},{"line_number":37,"context_line":"        self.conf.register_opts(interface.OPTS)"},{"line_number":38,"context_line":"        self.conf.set_override(\u0027interface_driver\u0027,"},{"line_number":39,"context_line":"                               \u0027neutron.agent.linux.interface.NullDriver\u0027)"},{"line_number":40,"context_line":"        self.ri_kwargs \u003d {\u0027agent_conf\u0027: self.conf,"},{"line_number":41,"context_line":"            \u0027interface_driver\u0027: self.mock_driver}"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_6bb38398","line":39,"updated":"2016-08-24 09:21:52.000000000","message":"why would you even need to initialize the driver? You mock the driver used for the router in line 32.","commit_id":"6ec96a2688ca436f7978151f92e3b8724c8c72c1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ea37ea146ef9dae942c6a575e44fb514a3e4c501","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        ri \u003d l3router.RouterInfo(ns_id, router, **self.ri_kwargs)"},{"line_number":61,"context_line":"        agent \u003d mock.MagicMock()"},{"line_number":62,"context_line":"        agent.router_info \u003d mock.Mock(return_value\u003d[ri])"},{"line_number":63,"context_line":"        api_object \u003d l3_agent_api.L3AgentExtensionAPI(agent)"},{"line_number":64,"context_line":"        router_info \u003d api_object.request_router_info()"},{"line_number":65,"context_line":"        self.assertTrue(router_info.ns_name.endswith(ns_id))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_8bdfdfd4","line":63,"range":{"start_line":63,"start_character":54,"end_line":63,"end_character":59},"updated":"2016-08-24 09:21:52.000000000","message":"in the __init__ function for the class, you have the \u0027router_info\u0027 argument, not an agent.","commit_id":"6ec96a2688ca436f7978151f92e3b8724c8c72c1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ea37ea146ef9dae942c6a575e44fb514a3e4c501","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        agent.router_info \u003d mock.Mock(return_value\u003d[ri])"},{"line_number":63,"context_line":"        api_object \u003d l3_agent_api.L3AgentExtensionAPI(agent)"},{"line_number":64,"context_line":"        router_info \u003d api_object.request_router_info()"},{"line_number":65,"context_line":"        self.assertTrue(router_info.ns_name.endswith(ns_id))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_ebbe5363","line":65,"updated":"2016-08-24 09:21:52.000000000","message":"not sure how it would pass the test since request_router_info basically returns whatever was passed into __init__ for the API object. That is, \u0027agent\u0027, not agent.router_info\u0027.\n\nOr does it pass just because router_info is MagicMock, so any calls to any of its methods just work? There is something fishy here.","commit_id":"6ec96a2688ca436f7978151f92e3b8724c8c72c1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from neutron.agent.l3 import l3_agent_extension_api as l3_agent_api"},{"line_number":19,"context_line":"from neutron.agent.l3 import router_info"},{"line_number":20,"context_line":"from neutron.agent.linux import ip_lib"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_dcedecf0","line":17,"updated":"2016-08-31 11:31:26.000000000","message":"nit: insert empty line after 17.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from neutron.agent.l3 import l3_agent_extension_api as l3_agent_api"},{"line_number":19,"context_line":"from neutron.agent.l3 import router_info"},{"line_number":20,"context_line":"from neutron.agent.linux import ip_lib"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_a110fca9","line":17,"in_reply_to":"fa7ab95a_dcedecf0","updated":"2016-08-31 12:08:49.000000000","message":"Will do.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.agent.l3 import router_info"},{"line_number":20,"context_line":"from neutron.agent.linux import ip_lib"},{"line_number":21,"context_line":"from neutron.tests import base"},{"line_number":22,"context_line":"import uuid"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestL3AgentExtensionApi(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_dcc40c61","line":22,"updated":"2016-08-31 11:31:26.000000000","message":"stdlib, move to line 16, and make sure there is a newline between this import and mock one (mock is 3party).","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.agent.l3 import router_info"},{"line_number":20,"context_line":"from neutron.agent.linux import ip_lib"},{"line_number":21,"context_line":"from neutron.tests import base"},{"line_number":22,"context_line":"import uuid"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestL3AgentExtensionApi(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_0120c8f6","line":22,"in_reply_to":"fa7ab95a_dcc40c61","updated":"2016-08-31 12:08:49.000000000","message":"Will fix.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        self.router_id \u003d str(uuid.uuid4())"},{"line_number":29,"context_line":"        self.project_id \u003d str(uuid.uuid4())"},{"line_number":30,"context_line":"        ri_kwargs \u003d {\u0027router\u0027: {\u0027id\u0027: self.router_id,"},{"line_number":31,"context_line":"                        \u0027project_id\u0027: self.project_id},"},{"line_number":32,"context_line":"                        \u0027agent_conf\u0027: mock.ANY,"},{"line_number":33,"context_line":"                        \u0027interface_driver\u0027: mock.ANY,"},{"line_number":34,"context_line":"                        \u0027use_ipv6\u0027: mock.ANY}"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_dc9b2c71","line":31,"updated":"2016-08-31 11:31:26.000000000","message":"can we fix indentation here?","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        self.router_id \u003d str(uuid.uuid4())"},{"line_number":29,"context_line":"        self.project_id \u003d str(uuid.uuid4())"},{"line_number":30,"context_line":"        ri_kwargs \u003d {\u0027router\u0027: {\u0027id\u0027: self.router_id,"},{"line_number":31,"context_line":"                        \u0027project_id\u0027: self.project_id},"},{"line_number":32,"context_line":"                        \u0027agent_conf\u0027: mock.ANY,"},{"line_number":33,"context_line":"                        \u0027interface_driver\u0027: mock.ANY,"},{"line_number":34,"context_line":"                        \u0027use_ipv6\u0027: mock.ANY}"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_211dccbd","line":31,"in_reply_to":"fa7ab95a_dc9b2c71","updated":"2016-08-31 12:08:49.000000000","message":"Will fix.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.project_id \u003d str(uuid.uuid4())"},{"line_number":30,"context_line":"        ri_kwargs \u003d {\u0027router\u0027: {\u0027id\u0027: self.router_id,"},{"line_number":31,"context_line":"                        \u0027project_id\u0027: self.project_id},"},{"line_number":32,"context_line":"                        \u0027agent_conf\u0027: mock.ANY,"},{"line_number":33,"context_line":"                        \u0027interface_driver\u0027: mock.ANY,"},{"line_number":34,"context_line":"                        \u0027use_ipv6\u0027: mock.ANY}"},{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_7c7b002a","line":32,"updated":"2016-08-31 11:31:26.000000000","message":"ditto, should be indented as \u0027router\u0027 in line 30.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.project_id \u003d str(uuid.uuid4())"},{"line_number":30,"context_line":"        ri_kwargs \u003d {\u0027router\u0027: {\u0027id\u0027: self.router_id,"},{"line_number":31,"context_line":"                        \u0027project_id\u0027: self.project_id},"},{"line_number":32,"context_line":"                        \u0027agent_conf\u0027: mock.ANY,"},{"line_number":33,"context_line":"                        \u0027interface_driver\u0027: mock.ANY,"},{"line_number":34,"context_line":"                        \u0027use_ipv6\u0027: mock.ANY}"},{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_a1871cd6","line":32,"in_reply_to":"fa7ab95a_7c7b002a","updated":"2016-08-31 12:08:49.000000000","message":"Will fix.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"},{"line_number":36,"context_line":"                                      **ri_kwargs)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_in_ns_ports_for_non_ns_fw(self):"},{"line_number":39,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":40,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":41,"context_line":"        ri \u003d self._prepare_router_data()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_9c69a428","line":38,"range":{"start_line":38,"start_character":40,"end_line":38,"end_character":42},"updated":"2016-08-31 11:31:26.000000000","message":"what is fw? firewall? why are tests specific to this use case? They should target the API in general terms.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"},{"line_number":36,"context_line":"                                      **ri_kwargs)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_in_ns_ports_for_non_ns_fw(self):"},{"line_number":39,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":40,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":41,"context_line":"        ri \u003d self._prepare_router_data()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_dc1c0cc4","line":38,"updated":"2016-08-31 11:31:26.000000000","message":"would be cool if test case names would contain the names of functions they target. f.e. that one could be test_get_router_from_port_id_rootns_fw.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"06709a1ba6b9584e21bff6121807f4010f19e096","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"},{"line_number":36,"context_line":"                                      **ri_kwargs)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_in_ns_ports_for_non_ns_fw(self):"},{"line_number":39,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":40,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":41,"context_line":"        ri \u003d self._prepare_router_data()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_1b4cb075","line":38,"range":{"start_line":38,"start_character":40,"end_line":38,"end_character":42},"in_reply_to":"fa7ab95a_2881284e","updated":"2016-08-31 13:50:34.000000000","message":"I meant that you should not refer to firewalls here. The API is not fwaas specific.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"},{"line_number":36,"context_line":"                                      **ri_kwargs)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_in_ns_ports_for_non_ns_fw(self):"},{"line_number":39,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":40,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":41,"context_line":"        ri \u003d self._prepare_router_data()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_a4b48ad1","line":38,"range":{"start_line":38,"start_character":40,"end_line":38,"end_character":42},"in_reply_to":"fa7ab95a_9c69a428","updated":"2016-08-31 12:08:49.000000000","message":"\"fw\" here is a firewall group.  I can fix that, but, that said,  I\u0027m not sure what you mean by testing the API generally, in a set of unit tests.  I\u0027m sorry I\u0027m not understanding you yet.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"f4a2ab60daa1562f8a7d09568ea57509b13774e7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"},{"line_number":36,"context_line":"                                      **ri_kwargs)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_in_ns_ports_for_non_ns_fw(self):"},{"line_number":39,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":40,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":41,"context_line":"        ri \u003d self._prepare_router_data()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_2881284e","line":38,"range":{"start_line":38,"start_character":40,"end_line":38,"end_character":42},"in_reply_to":"fa7ab95a_a4b48ad1","updated":"2016-08-31 13:41:37.000000000","message":"I got it now (thanks again Nate).  Will fix.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return router_info.RouterInfo(self.router_id,"},{"line_number":36,"context_line":"                                      **ri_kwargs)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_in_ns_ports_for_non_ns_fw(self):"},{"line_number":39,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":40,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":41,"context_line":"        ri \u003d self._prepare_router_data()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_24bb1a10","line":38,"in_reply_to":"fa7ab95a_dc1c0cc4","updated":"2016-08-31 12:08:49.000000000","message":"I agree.  Will do my best to fix these up.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            mock_get_namespaces.return_value \u003d []"},{"line_number":50,"context_line":"            api_object \u003d l3_agent_api.L3AgentExtensionAPI(router_info)"},{"line_number":51,"context_line":"            routers_for_fw_list \u003d api_object.get_router_from_port_id("},{"line_number":52,"context_line":"                    fw_port_id)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        mock_get_namespaces.assert_called_once_with()"},{"line_number":55,"context_line":"        self.assertFalse(routers_for_fw_list)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_5c163c56","line":52,"range":{"start_line":52,"start_character":20,"end_line":52,"end_character":30},"updated":"2016-08-31 11:31:26.000000000","message":"so you pass a list into a function that expects a single id. this is not the right way of using the API.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            mock_get_namespaces.return_value \u003d []"},{"line_number":50,"context_line":"            api_object \u003d l3_agent_api.L3AgentExtensionAPI(router_info)"},{"line_number":51,"context_line":"            routers_for_fw_list \u003d api_object.get_router_from_port_id("},{"line_number":52,"context_line":"                    fw_port_id)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        mock_get_namespaces.assert_called_once_with()"},{"line_number":55,"context_line":"        self.assertFalse(routers_for_fw_list)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_41c65017","line":52,"range":{"start_line":52,"start_character":20,"end_line":52,"end_character":30},"in_reply_to":"fa7ab95a_5c163c56","updated":"2016-08-31 12:08:49.000000000","message":"Will fix.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"144f633207ea8ea4e5872d2221d914d54d0789d3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def test_get_in_ns_routers_for_fw(self):"},{"line_number":58,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":59,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":60,"context_line":"        ri \u003d self._prepare_router_data()"},{"line_number":61,"context_line":"        ri.internal_ports \u003d ports"},{"line_number":62,"context_line":"        router_info \u003d {}"},{"line_number":63,"context_line":"        router_info[ri.router_id] \u003d ri"},{"line_number":64,"context_line":"        fw_port_id \u003d 1"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        with mock.patch.object(ip_lib.IPWrapper,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_3c43386e","line":63,"range":{"start_line":60,"start_character":8,"end_line":63,"end_character":38},"updated":"2016-08-31 11:31:26.000000000","message":"Those lines are pretty much identical for all test cases. You could just pass internal_ports into _prepare_router_data as an argument and allow the helper function to return the router_info dict for you ready to be used.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"043d87141f1f89aeb3a95a216e9974792dc391a7","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def test_get_in_ns_routers_for_fw(self):"},{"line_number":58,"context_line":"        port_ids \u003d [1, 2]"},{"line_number":59,"context_line":"        ports \u003d [{\u0027id\u0027: pid} for pid in port_ids]"},{"line_number":60,"context_line":"        ri \u003d self._prepare_router_data()"},{"line_number":61,"context_line":"        ri.internal_ports \u003d ports"},{"line_number":62,"context_line":"        router_info \u003d {}"},{"line_number":63,"context_line":"        router_info[ri.router_id] \u003d ri"},{"line_number":64,"context_line":"        fw_port_id \u003d 1"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        with mock.patch.object(ip_lib.IPWrapper,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_41ed708d","line":63,"range":{"start_line":60,"start_character":8,"end_line":63,"end_character":38},"in_reply_to":"fa7ab95a_3c43386e","updated":"2016-08-31 12:08:49.000000000","message":"Will fix.","commit_id":"24a15b309b1d9e2b063cb4cd64fb3c784c7b45e1"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"8ae4110d580af9f30891c01d1183d1f906af31a0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        ri \u003d self._prepare_router_data()"},{"line_number":44,"context_line":"        ri.internal_ports \u003d ports"},{"line_number":45,"context_line":"        router_info \u003d {ri.router_id: ri}"},{"line_number":46,"context_line":"        fw_port_id \u003d port_ids"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        with mock.patch.object(ip_lib.IPWrapper,"},{"line_number":49,"context_line":"                               \u0027get_namespaces\u0027) as mock_get_namespaces:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_be08122f","line":46,"range":{"start_line":46,"start_character":8,"end_line":46,"end_character":18},"updated":"2016-08-31 14:11:21.000000000","message":"I just saw this.  I had intended to check throughout for these but forgot.  Will fix these and others.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0f5cbd5bf58ffd6e932b75048c5ce8cb1c36857f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            mock_get_namespaces.return_value \u003d []"},{"line_number":52,"context_line":"            api_object \u003d l3_agent_api.L3AgentExtensionAPI(router_info)"},{"line_number":53,"context_line":"            routers_for_fw_list \u003d api_object.get_router_hosting_port("},{"line_number":54,"context_line":"                    fw_port_id)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        mock_get_namespaces.assert_called_once_with()"},{"line_number":57,"context_line":"        self.assertFalse(routers_for_fw_list)"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_d9e33004","line":54,"updated":"2016-08-31 14:15:13.000000000","message":"you still pass a list...","commit_id":"db31e26a93d44143dea46ef63912e627accde365"},{"author":{"_account_id":17711,"name":"Margaret Frances","email":"margaret_frances@cable.comcast.com","username":"margaret-frances"},"change_message_id":"d8f8183c8f700fb4d799fe04ccebd27da50e2b5c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            mock_get_namespaces.return_value \u003d []"},{"line_number":52,"context_line":"            api_object \u003d l3_agent_api.L3AgentExtensionAPI(router_info)"},{"line_number":53,"context_line":"            routers_for_fw_list \u003d api_object.get_router_hosting_port("},{"line_number":54,"context_line":"                    fw_port_id)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        mock_get_namespaces.assert_called_once_with()"},{"line_number":57,"context_line":"        self.assertFalse(routers_for_fw_list)"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_9948c889","line":54,"in_reply_to":"fa7ab95a_d9e33004","updated":"2016-08-31 15:16:57.000000000","message":"Fixing now.  Sorry I missed these last items in my latest PS.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0f5cbd5bf58ffd6e932b75048c5ce8cb1c36857f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        ri \u003d self._prepare_router_data()"},{"line_number":63,"context_line":"        ri.internal_ports \u003d ports"},{"line_number":64,"context_line":"        router_info \u003d {}"},{"line_number":65,"context_line":"        router_info[ri.router_id] \u003d ri"},{"line_number":66,"context_line":"        fw_port_id \u003d 1"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        with mock.patch.object(ip_lib.IPWrapper,"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa7ab95a_99afe893","line":65,"updated":"2016-08-31 14:15:13.000000000","message":"code deduplication is probably due, as commented in prev PS.","commit_id":"db31e26a93d44143dea46ef63912e627accde365"}]}
