'Given a port_id, look up the router associated with that port in
local namespace. Returns a RouterInfo object (or None if the router
is not found).'

def get_router_hosting_port(self, port_id):

    if port_id:
        local_namespaces = self._local_namespaces()
        for router_info in self._router_info.values():
            if (router_info.ns_name in local_namespaces):
                for port in router_info.internal_ports:
                    if (port['id'] == port_id):
                        return router_info
