)]}'
{"dragonflow/common/exceptions.py":[{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"b5273d1308bfea75dd9b59d01a7f21485db7aff8","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    message \u003d _(\u0027DB client not found, ip\u003d%(ip)s\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class DBStoreRecordNotFound(DragonflowException):"},{"line_number":86,"context_line":"    message \u003d _(\u0027%(record)s not found in db_store!\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_dfe2b7d4","line":85,"updated":"2016-09-13 06:32:27.000000000","message":"There is DBKeyNotFound exception.\nWhy u can not use it ?","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    message \u003d _(\u0027DB client not found, ip\u003d%(ip)s\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class DBStoreRecordNotFound(DragonflowException):"},{"line_number":86,"context_line":"    message \u003d _(\u0027%(record)s not found in db_store!\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_89723ee4","line":85,"in_reply_to":"9a89bdaa_dfe2b7d4","updated":"2016-09-14 10:53:18.000000000","message":"This exception indicates that record not found in db store. DBKeyNotFound is key not found in dragonflow database. So they are different.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"}],"dragonflow/common/utils.py":[{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"18ef83c5b10f375a48ee9f7730e51de608d31e27","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def ExceptionCapturer(func):"},{"line_number":190,"context_line":"    def wrapper(*args):"},{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            func(*args)"},{"line_number":193,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_9db06e45","line":190,"range":{"start_line":190,"start_character":17,"end_line":190,"end_character":21},"updated":"2016-07-19 08:04:11.000000000","message":"the parameter of handler should be *args, **kwargs","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        return False"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def ExceptionCapturer(func):"},{"line_number":190,"context_line":"    def wrapper(*args):"},{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            func(*args)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_ac0e7d38","line":189,"updated":"2016-08-01 06:12:58.000000000","message":"Discussion: (-1 doesn\u0027t affect here)\n\nAfter some consideration, I believe this decorator may be a Bad Idea. Exceptions should be expected and handled explicitly, or propagated upwards so we know we have a bug.\n\nThis decorator would make exceptions be magically handled. The code might exit in the middle, without proper cleanup, and leave the system in an incoherent state.\n\nIn my experience, shying away exceptions costs more time troubleshooting an issue in the long run. If they are expected, they should be silently handled. Otherwise, they should be printed. Having expected exceptions printed to the logs as errors is confusing, both to developers and users/deployers.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        return False"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def ExceptionCapturer(func):"},{"line_number":190,"context_line":"    def wrapper(*args):"},{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            func(*args)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_4f24a2ae","line":189,"in_reply_to":"bacf61ea_ac0e7d38","updated":"2016-08-22 13:26:18.000000000","message":"These are definitely not expected exceptions, this is why it is logged here. The original idea is :\n For controller platform doesn\u0027t know how to process exceptions generated by apps, it just record the exception and go on.\n But a better place to do that may be in the dispatcher.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def ExceptionCapturer(func):"},{"line_number":190,"context_line":"    def wrapper(*args):"},{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            func(*args)"},{"line_number":193,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_ac4ddd3f","line":190,"updated":"2016-08-01 06:12:58.000000000","message":"@heshan\u0027s comment was not addressed here.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def ExceptionCapturer(func):"},{"line_number":190,"context_line":"    def wrapper(*args):"},{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            func(*args)"},{"line_number":193,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_cf3092eb","line":190,"in_reply_to":"bacf61ea_ac4ddd3f","updated":"2016-08-22 13:26:18.000000000","message":"This part will be removed.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"bfca6526fda133977365352f989196732209b713","unresolved":false,"context_lines":[{"line_number":376,"context_line":""},{"line_number":377,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":378,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") %"},{"line_number":379,"context_line":"                 route.__str__())"},{"line_number":380,"context_line":"        self.open_flow_app.notify_add_router_route("},{"line_number":381,"context_line":"            router, route)"},{"line_number":382,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_77d18efb","line":379,"updated":"2016-07-03 17:09:02.000000000","message":"Please use str(route) rather than route.__str__().","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"bfca6526fda133977365352f989196732209b713","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def _delete_router_route(self, router, route):"},{"line_number":384,"context_line":"        LOG.info(_LI(\"Removing logical router route \u003d %s\") %"},{"line_number":385,"context_line":"                 route.__str__())"},{"line_number":386,"context_line":"        self.open_flow_app.notify_remove_router_route("},{"line_number":387,"context_line":"            router, route)"},{"line_number":388,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_57ce125b","line":385,"updated":"2016-07-03 17:09:02.000000000","message":"Same here.","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"18ef83c5b10f375a48ee9f7730e51de608d31e27","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        self.open_flow_app.notify_remove_router_port("},{"line_number":421,"context_line":"                router_port, local_network_id)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    def _add_new_lrouter(self, lrouter):"},{"line_number":424,"context_line":"        for new_port in lrouter.get_ports():"},{"line_number":425,"context_line":"            self._add_new_router_port(lrouter, new_port)"},{"line_number":426,"context_line":"        self.db_store.update_router(lrouter.get_id(), lrouter)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_5d427611","line":423,"range":{"start_line":423,"start_character":8,"end_line":423,"end_character":24},"updated":"2016-07-19 08:04:11.000000000","message":"when router is created with routes, those routes should be added too.","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"e15b486218b56c0130b8e23e723dd60e2ea2c757","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    def _add_new_lrouter(self, lrouter):"},{"line_number":432,"context_line":"        for new_port in lrouter.get_ports():"},{"line_number":433,"context_line":"            self._add_new_router_port(lrouter, new_port)"},{"line_number":434,"context_line":"        routes \u003d lrouter.get_routers()"},{"line_number":435,"context_line":"        for route in routes:"},{"line_number":436,"context_line":"            self._add_router_route(lrouter, route)"},{"line_number":437,"context_line":"        self.db_store.update_router(lrouter.get_id(), lrouter)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_29c64648","line":434,"range":{"start_line":434,"start_character":25,"end_line":434,"end_character":36},"updated":"2016-07-29 08:13:50.000000000","message":"get_routes()?","commit_id":"504bcdd9e396e2742c5d29323e6386732c7e755d"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"2a0962c91db2d71f301f2c9f759eba11626f3680","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    def _add_new_lrouter(self, lrouter):"},{"line_number":432,"context_line":"        for new_port in lrouter.get_ports():"},{"line_number":433,"context_line":"            self._add_new_router_port(lrouter, new_port)"},{"line_number":434,"context_line":"        routes \u003d lrouter.get_routers()"},{"line_number":435,"context_line":"        for route in routes:"},{"line_number":436,"context_line":"            self._add_router_route(lrouter, route)"},{"line_number":437,"context_line":"        self.db_store.update_router(lrouter.get_id(), lrouter)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_294be6ca","line":434,"range":{"start_line":434,"start_character":25,"end_line":434,"end_character":36},"in_reply_to":"bacf61ea_29c64648","updated":"2016-07-29 08:16:01.000000000","message":"it\u0027s a typo, I\u0027ll modify it right now","commit_id":"504bcdd9e396e2742c5d29323e6386732c7e755d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c2240648e472210db024384da5d049effd906276","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":379,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":380,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":381,"context_line":"        for new_route in new_routes:"},{"line_number":382,"context_line":"            if new_route not in old_routes:"},{"line_number":383,"context_line":"                self._add_router_route(new_router, new_route)"},{"line_number":384,"context_line":"            else:"},{"line_number":385,"context_line":"                old_routes.remove(new_route)"},{"line_number":386,"context_line":"        for old_route in old_routes:"},{"line_number":387,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":390,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") %"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_11184ad2","line":387,"range":{"start_line":381,"start_character":0,"end_line":387,"end_character":60},"updated":"2016-08-02 01:08:10.000000000","message":"I think this could be replaced with set operation to make it more clear. For example:\n\nfor route in new_routes - old_routes:\n    # add new route\n\nfor route in old_routes - new_routes:\n    # delete stale routes","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"c1d69e438a140e353cc4dad5e8dd5188470c3559","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":379,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":380,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":381,"context_line":"        for new_route in new_routes:"},{"line_number":382,"context_line":"            if new_route not in old_routes:"},{"line_number":383,"context_line":"                self._add_router_route(new_router, new_route)"},{"line_number":384,"context_line":"            else:"},{"line_number":385,"context_line":"                old_routes.remove(new_route)"},{"line_number":386,"context_line":"        for old_route in old_routes:"},{"line_number":387,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":390,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") %"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_1b2fd4a1","line":387,"range":{"start_line":381,"start_character":0,"end_line":387,"end_character":60},"in_reply_to":"3ac371cc_cf7d32b3","updated":"2016-08-23 23:21:52.000000000","message":"they are lists, minus operation is not supported either","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":379,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":380,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":381,"context_line":"        for new_route in new_routes:"},{"line_number":382,"context_line":"            if new_route not in old_routes:"},{"line_number":383,"context_line":"                self._add_router_route(new_router, new_route)"},{"line_number":384,"context_line":"            else:"},{"line_number":385,"context_line":"                old_routes.remove(new_route)"},{"line_number":386,"context_line":"        for old_route in old_routes:"},{"line_number":387,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":390,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") %"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_cf7d32b3","line":387,"range":{"start_line":381,"start_character":0,"end_line":387,"end_character":60},"in_reply_to":"bacf61ea_11184ad2","updated":"2016-08-22 13:26:18.000000000","message":"they are not sets, but maps. minus operation is not supported.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c2240648e472210db024384da5d049effd906276","unresolved":false,"context_lines":[{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":390,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") %"},{"line_number":391,"context_line":"                 str(route))"},{"line_number":392,"context_line":"        self.open_flow_app.notify_add_router_route("},{"line_number":393,"context_line":"            router, route)"},{"line_number":394,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_317c6eeb","line":391,"range":{"start_line":391,"start_character":16,"end_line":391,"end_character":27},"updated":"2016-08-02 01:08:10.000000000","message":"I think the explicitly str() convert might not be needed here. The string format will do the convert.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":390,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") %"},{"line_number":391,"context_line":"                 str(route))"},{"line_number":392,"context_line":"        self.open_flow_app.notify_add_router_route("},{"line_number":393,"context_line":"            router, route)"},{"line_number":394,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_cf2b7293","line":391,"range":{"start_line":391,"start_character":16,"end_line":391,"end_character":27},"in_reply_to":"bacf61ea_317c6eeb","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        for router_to_remove in routers_to_remove:"},{"line_number":390,"context_line":"            self.router_deleted(router_to_remove)"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":393,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":394,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":395,"context_line":"        for new_route in new_routes:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_b372d2ab","line":392,"range":{"start_line":392,"start_character":8,"end_line":392,"end_character":33},"updated":"2016-08-25 13:46:47.000000000","message":"What about rename to _update_router_extraroute, this method name may conflict with others if there is other attribute in router needs update.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"4b3b8b3800896a40685a72c9163cc632b32d6d71","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        for router_to_remove in routers_to_remove:"},{"line_number":390,"context_line":"            self.router_deleted(router_to_remove)"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":393,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":394,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":395,"context_line":"        for new_route in new_routes:"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_38b516cd","line":392,"range":{"start_line":392,"start_character":8,"end_line":392,"end_character":33},"in_reply_to":"1ac06dbe_b372d2ab","updated":"2016-08-26 02:28:19.000000000","message":"The function is entrance of modifying router attributes. Currently, only modification of router\u0027s routes is supported. New features can be added and it can be split when it\u0027s too big in the future.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":393,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":394,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":395,"context_line":"        for new_route in new_routes:"},{"line_number":396,"context_line":"            if new_route not in old_routes:"},{"line_number":397,"context_line":"                self._add_router_route(new_router, new_route)"},{"line_number":398,"context_line":"            else:"},{"line_number":399,"context_line":"                old_routes.remove(new_route)"},{"line_number":400,"context_line":"        for old_route in old_routes:"},{"line_number":401,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":404,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") % route)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_7ca80678","line":401,"range":{"start_line":395,"start_character":0,"end_line":401,"end_character":60},"updated":"2016-08-25 13:46:47.000000000","message":"I don\u0027t know if it is good to send every route a notification. Maybe you can just send one message about \"router_extra_route_update\".\nThen the app can get this message and retrieve the routes from db, and then compare  with local cache.\n\nThis might save some lines in the df_local_controller.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"de05f638def56a3695e3b7e86ce15851b1c3e13c","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":393,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":394,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":395,"context_line":"        for new_route in new_routes:"},{"line_number":396,"context_line":"            if new_route not in old_routes:"},{"line_number":397,"context_line":"                self._add_router_route(new_router, new_route)"},{"line_number":398,"context_line":"            else:"},{"line_number":399,"context_line":"                old_routes.remove(new_route)"},{"line_number":400,"context_line":"        for old_route in old_routes:"},{"line_number":401,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":404,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") % route)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_229ec356","line":401,"range":{"start_line":395,"start_character":0,"end_line":401,"end_character":60},"in_reply_to":"1ac06dbe_7ca80678","updated":"2016-08-26 01:41:34.000000000","message":"in my opinion, df is designed to prepare all the data for apps, so the apps could just use the data directly and focus on the job of it\u0027s own.\nit also makes app independent of change of db accessing.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"4b3b8b3800896a40685a72c9163cc632b32d6d71","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":393,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":394,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":395,"context_line":"        for new_route in new_routes:"},{"line_number":396,"context_line":"            if new_route not in old_routes:"},{"line_number":397,"context_line":"                self._add_router_route(new_router, new_route)"},{"line_number":398,"context_line":"            else:"},{"line_number":399,"context_line":"                old_routes.remove(new_route)"},{"line_number":400,"context_line":"        for old_route in old_routes:"},{"line_number":401,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":404,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") % route)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_d3cfabb1","line":401,"range":{"start_line":395,"start_character":0,"end_line":401,"end_character":60},"in_reply_to":"fa7ab95a_229ec356","updated":"2016-08-26 02:28:19.000000000","message":"Yes, this is similar to _update_router_interfaces.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            ofport \u003d lport_to_ofport.get(lport.get_id(), 0)"},{"line_number":238,"context_line":"            if ofport !\u003d 0:"},{"line_number":239,"context_line":"                lport.set_external_value(\u0027ofport\u0027, ofport)"},{"line_number":240,"context_line":"                self.db_store.set_port(lport.get_id(), lport, True)"},{"line_number":241,"context_line":"                if original_lport is None:"},{"line_number":242,"context_line":"                    LOG.info(_LI(\"Adding new local logical port \u003d %s\") %"},{"line_number":243,"context_line":"                             str(lport))"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_79958be2","line":240,"updated":"2016-09-12 11:21:46.000000000","message":"This change was done here: https://review.openstack.org/#/c/368328/ . Please rebase on top of that.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            ofport \u003d lport_to_ofport.get(lport.get_id(), 0)"},{"line_number":238,"context_line":"            if ofport !\u003d 0:"},{"line_number":239,"context_line":"                lport.set_external_value(\u0027ofport\u0027, ofport)"},{"line_number":240,"context_line":"                self.db_store.set_port(lport.get_id(), lport, True)"},{"line_number":241,"context_line":"                if original_lport is None:"},{"line_number":242,"context_line":"                    LOG.info(_LI(\"Adding new local logical port \u003d %s\") %"},{"line_number":243,"context_line":"                             str(lport))"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_e24685be","line":240,"in_reply_to":"9a89bdaa_79958be2","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        for router_to_remove in routers_to_remove:"},{"line_number":400,"context_line":"            self.router_deleted(router_to_remove)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":403,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":404,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":405,"context_line":"        for new_route in new_routes:"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_3c77713b","line":402,"updated":"2016-09-12 11:21:46.000000000","message":"Maybe move this logic into the l3 app?","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        for router_to_remove in routers_to_remove:"},{"line_number":400,"context_line":"            self.router_deleted(router_to_remove)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":403,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":404,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":405,"context_line":"        for new_route in new_routes:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_a2b9daeb","line":402,"in_reply_to":"9a89bdaa_3c77713b","updated":"2016-09-14 10:53:18.000000000","message":"We should. I will move the xxx_router_interface, xxx_router_port and xxx_router_attributes to corresponding l3_app and l3_proactive_app in another patch. Just don\u0027t want to increase the size of this patch any more.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":411,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":414,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") % route)"},{"line_number":415,"context_line":"        self.open_flow_app.notify_add_router_route("},{"line_number":416,"context_line":"            router, route)"},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_fcd189fc","line":414,"updated":"2016-09-12 11:21:46.000000000","message":"Don\u0027t use % when sending a string to LOG methods. Pass the variables, and let LOG format the string.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":411,"context_line":"            self._delete_router_route(new_router, old_route)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    def _add_router_route(self, router, route):"},{"line_number":414,"context_line":"        LOG.info(_LI(\"Adding new logical router route \u003d %s\") % route)"},{"line_number":415,"context_line":"        self.open_flow_app.notify_add_router_route("},{"line_number":416,"context_line":"            router, route)"},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_c572707c","line":414,"in_reply_to":"9a89bdaa_fcd189fc","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            router, route)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _delete_router_route(self, router, route):"},{"line_number":419,"context_line":"        LOG.info(_LI(\"Removing logical router route \u003d %s\") %"},{"line_number":420,"context_line":"                 str(route))"},{"line_number":421,"context_line":"        self.open_flow_app.notify_remove_router_route("},{"line_number":422,"context_line":"            router, route)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_3cdcd111","line":419,"updated":"2016-09-12 11:21:46.000000000","message":"Same here.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            router, route)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _delete_router_route(self, router, route):"},{"line_number":419,"context_line":"        LOG.info(_LI(\"Removing logical router route \u003d %s\") %"},{"line_number":420,"context_line":"                 str(route))"},{"line_number":421,"context_line":"        self.open_flow_app.notify_remove_router_route("},{"line_number":422,"context_line":"            router, route)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_056d3898","line":419,"in_reply_to":"9a89bdaa_3cdcd111","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _delete_router_route(self, router, route):"},{"line_number":419,"context_line":"        LOG.info(_LI(\"Removing logical router route \u003d %s\") %"},{"line_number":420,"context_line":"                 str(route))"},{"line_number":421,"context_line":"        self.open_flow_app.notify_remove_router_route("},{"line_number":422,"context_line":"            router, route)"},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_5cd7d5ec","line":420,"updated":"2016-09-12 11:21:46.000000000","message":"And str(route)-\u003eroute can be done here too.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _delete_router_route(self, router, route):"},{"line_number":419,"context_line":"        LOG.info(_LI(\"Removing logical router route \u003d %s\") %"},{"line_number":420,"context_line":"                 str(route))"},{"line_number":421,"context_line":"        self.open_flow_app.notify_remove_router_route("},{"line_number":422,"context_line":"            router, route)"},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_450580c0","line":420,"in_reply_to":"9a89bdaa_5cd7d5ec","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53cf7edb611a65a02ab6cac11ef387e5bb9a86d2","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        for router_to_remove in routers_to_remove:"},{"line_number":400,"context_line":"            self.router_deleted(router_to_remove)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def _update_router_attributes(self, old_router, new_router):"},{"line_number":403,"context_line":"        old_routes \u003d old_router.get_routes()"},{"line_number":404,"context_line":"        new_routes \u003d new_router.get_routes()"},{"line_number":405,"context_line":"        for new_route in new_routes:"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a8ec9b2_0bf6ded6","line":402,"updated":"2016-09-15 11:42:45.000000000","message":"Adding it as a new patch is acceptable, but please upload that patch.","commit_id":"8fbd8b89f6a0ba36446928a820127eb550cf0d6d"}],"dragonflow/controller/dispatcher.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        for app in self.apps:"},{"line_number":41,"context_line":"            handler \u003d getattr(app, method, None)"},{"line_number":42,"context_line":"            if handler is not None:"},{"line_number":43,"context_line":"                try:"},{"line_number":44,"context_line":"                    handler(*args, **kwargs)"},{"line_number":45,"context_line":"                except Exception as e:"},{"line_number":46,"context_line":"                    LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_a99362f9","line":46,"range":{"start_line":43,"start_character":0,"end_line":46,"end_character":36},"updated":"2016-08-25 13:46:47.000000000","message":"If this related to the patch?","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"de05f638def56a3695e3b7e86ce15851b1c3e13c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        for app in self.apps:"},{"line_number":41,"context_line":"            handler \u003d getattr(app, method, None)"},{"line_number":42,"context_line":"            if handler is not None:"},{"line_number":43,"context_line":"                try:"},{"line_number":44,"context_line":"                    handler(*args, **kwargs)"},{"line_number":45,"context_line":"                except Exception as e:"},{"line_number":46,"context_line":"                    LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_58ce5a84","line":46,"range":{"start_line":43,"start_character":0,"end_line":46,"end_character":36},"in_reply_to":"1ac06dbe_a99362f9","updated":"2016-08-26 01:41:34.000000000","message":"I think so","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                try:"},{"line_number":44,"context_line":"                    handler(*args, **kwargs)"},{"line_number":45,"context_line":"                except Exception as e:"},{"line_number":46,"context_line":"                    LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_5f0502c0","line":46,"updated":"2016-09-12 11:21:46.000000000","message":"Please add a meaningful error message here.\n\nYou don\u0027t need to give e directly to LOG.exception. It finds the exception info automatically.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                try:"},{"line_number":44,"context_line":"                    handler(*args, **kwargs)"},{"line_number":45,"context_line":"                except Exception as e:"},{"line_number":46,"context_line":"                    LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_2518741d","line":46,"in_reply_to":"9a89bdaa_5f0502c0","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"}],"dragonflow/controller/l3_proactive_app.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"752b12929c0eee8a4d4338692f8e512674d79801","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        else:"},{"line_number":110,"context_line":"            raise Exception(\u0027Port has illegal ip %s \u0027 % str(lport))"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _get_port_by_ip_and_topic(self, ip, topic):"},{"line_number":113,"context_line":"        ports \u003d self.db_store.get_ports(topic)"},{"line_number":114,"context_line":"        for port in ports:"},{"line_number":115,"context_line":"            if port.get_ip() \u003d\u003d ip:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_959aa26c","line":112,"range":{"start_line":112,"start_character":8,"end_line":112,"end_character":33},"updated":"2016-06-24 07:00:30.000000000","message":"Is it possible that a tenant has tow ports with the same IP address in two or more networks?","commit_id":"f9201491f2cd0778a792e3df71f4ffb44dfa27db"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"bccadbe6575c2ad188937a806e267e0278b18087","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        else:"},{"line_number":110,"context_line":"            raise Exception(\u0027Port has illegal ip %s \u0027 % str(lport))"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _get_port_by_ip_and_topic(self, ip, topic):"},{"line_number":113,"context_line":"        ports \u003d self.db_store.get_ports(topic)"},{"line_number":114,"context_line":"        for port in ports:"},{"line_number":115,"context_line":"            if port.get_ip() \u003d\u003d ip:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_fbe489ac","line":112,"range":{"start_line":112,"start_character":8,"end_line":112,"end_character":33},"in_reply_to":"3aaa91ec_959aa26c","updated":"2016-06-25 03:38:16.000000000","message":"I don\u0027t think tenants can have such ports.","commit_id":"f9201491f2cd0778a792e3df71f4ffb44dfa27db"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"752b12929c0eee8a4d4338692f8e512674d79801","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            if port.get_ip() \u003d\u003d ip:"},{"line_number":116,"context_line":"                return port"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _get_router_port_by_cidr(self, router, cidr):"},{"line_number":121,"context_line":"        for port in router.get_ports():"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_15b7d2f5","line":118,"range":{"start_line":118,"start_character":8,"end_line":118,"end_character":41},"updated":"2016-06-24 07:00:30.000000000","message":"Output the ip and topic could be more helpful","commit_id":"f9201491f2cd0778a792e3df71f4ffb44dfa27db"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"bccadbe6575c2ad188937a806e267e0278b18087","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            if port.get_ip() \u003d\u003d ip:"},{"line_number":116,"context_line":"                return port"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _get_router_port_by_cidr(self, router, cidr):"},{"line_number":121,"context_line":"        for port in router.get_ports():"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_5beafd74","line":118,"range":{"start_line":118,"start_character":8,"end_line":118,"end_character":41},"in_reply_to":"3aaa91ec_15b7d2f5","updated":"2016-06-25 03:38:16.000000000","message":"I have thought about it too. But the ip and topic info have already been output at entrance point of add_router_route","commit_id":"f9201491f2cd0778a792e3df71f4ffb44dfa27db"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"752b12929c0eee8a4d4338692f8e512674d79801","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            if port.get_cidr_network() \u003d\u003d cidr:"},{"line_number":123,"context_line":"                return port"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def add_router_route(self, router, route):"},{"line_number":128,"context_line":"        LOG.info(_LI(\u0027Add extra route %(route)s for router %(router)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_d5954a33","line":125,"range":{"start_line":125,"start_character":0,"end_line":125,"end_character":41},"updated":"2016-06-24 07:00:30.000000000","message":"Need more informations","commit_id":"f9201491f2cd0778a792e3df71f4ffb44dfa27db"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"b90cd352851513558513a0bd0ca4f05dba503606","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _get_router_port_by_cidr(self, router, cidr):"},{"line_number":109,"context_line":"        for port in router.get_ports():"},{"line_number":110,"context_line":"            if port.get_cidr_network() \u003d\u003d cidr:"},{"line_number":111,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_3d21144e","line":108,"range":{"start_line":108,"start_character":9,"end_line":108,"end_character":21},"updated":"2016-06-30 05:12:54.000000000","message":"This function is not needed any more:)","commit_id":"f52d304d765f7f181cd54bf3f84cd9e515ff9da2"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"a746a388fa39d2280b7fdbd22c685fbcee716738","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _get_router_port_by_cidr(self, router, cidr):"},{"line_number":109,"context_line":"        for port in router.get_ports():"},{"line_number":110,"context_line":"            if port.get_cidr_network() \u003d\u003d cidr:"},{"line_number":111,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_72db8c4f","line":108,"range":{"start_line":108,"start_character":9,"end_line":108,"end_character":21},"in_reply_to":"3aaa91ec_3d21144e","updated":"2016-07-01 08:04:44.000000000","message":"Done","commit_id":"f52d304d765f7f181cd54bf3f84cd9e515ff9da2"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"b90cd352851513558513a0bd0ca4f05dba503606","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        if destination.version \u003d\u003d 4:"},{"line_number":154,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":155,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":156,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":157,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_3dfab4bd","line":156,"range":{"start_line":156,"start_character":36,"end_line":156,"end_character":70},"updated":"2016-06-30 05:12:54.000000000","message":"If we use the match of IP src as a filter to routers, we might need to add all IP prefixes of this router\u0027s ports. If a VM has a IP address of 1.0.0.10, it can\u0027t access 3.0.0.30 through there is a route of which destination is 3.0.0.0/8 and next hop is 2.0.0.20. In that case, network 1.0.0.0/8 and 2.0.0.0/8 are both added to the router.","commit_id":"f52d304d765f7f181cd54bf3f84cd9e515ff9da2"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"a746a388fa39d2280b7fdbd22c685fbcee716738","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        if destination.version \u003d\u003d 4:"},{"line_number":154,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":155,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":156,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":157,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_8efb70c0","line":156,"range":{"start_line":156,"start_character":36,"end_line":156,"end_character":70},"in_reply_to":"3aaa91ec_3dfab4bd","updated":"2016-07-01 08:04:44.000000000","message":"To a dvr, if the nexthop belongs to the router\u0027s gateway network, the route can be applied to all subnets connected to that router. But if the nexthop belongs to one subnets of the router\u0027s interface(the router\u0027s downlink network), the route should be limited to the specific router interface.","commit_id":"f52d304d765f7f181cd54bf3f84cd9e515ff9da2"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"b90cd352851513558513a0bd0ca4f05dba503606","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        self.mod_flow("},{"line_number":221,"context_line":"            self.get_datapath(),"},{"line_number":222,"context_line":"            command\u003dofproto.OFPFC_DELETE,"},{"line_number":223,"context_line":"            table_id\u003dconst.L3_LOOKUP_TABLE,"},{"line_number":224,"context_line":"            priority\u003dconst.PRIORITY_VERY_HIGH,"},{"line_number":225,"context_line":"            out_port\u003dofproto.OFPP_ANY,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_1d709871","line":222,"range":{"start_line":222,"start_character":20,"end_line":222,"end_character":40},"updated":"2016-06-30 05:12:54.000000000","message":"Suggest using strict delete here.\nUsing fixed priority means we can\u0027t support longest prefix match. That not only means it won\u0027t work if a user do so, but also means errors could be caused. For example, a user create two routes: one is \"destination: 8.0.0.0/8, next hop: 1.0.0.1\", and the other is \"destination: 8.0.0.0/16, next hop: 1.0.0.2\". If the user delete the first route, flows representing the second could also be removed. Using strict delete here can avoid that.","commit_id":"f52d304d765f7f181cd54bf3f84cd9e515ff9da2"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"a746a388fa39d2280b7fdbd22c685fbcee716738","unresolved":false,"context_lines":[{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        self.mod_flow("},{"line_number":221,"context_line":"            self.get_datapath(),"},{"line_number":222,"context_line":"            command\u003dofproto.OFPFC_DELETE,"},{"line_number":223,"context_line":"            table_id\u003dconst.L3_LOOKUP_TABLE,"},{"line_number":224,"context_line":"            priority\u003dconst.PRIORITY_VERY_HIGH,"},{"line_number":225,"context_line":"            out_port\u003dofproto.OFPP_ANY,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3aaa91ec_8ecc106b","line":222,"range":{"start_line":222,"start_character":20,"end_line":222,"end_character":40},"in_reply_to":"3aaa91ec_1d709871","updated":"2016-07-01 08:04:44.000000000","message":"Done","commit_id":"f52d304d765f7f181cd54bf3f84cd9e515ff9da2"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"e88a2731288acef1a07283fd0d444c1a4c0f4f98","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            if port.get_ip() \u003d\u003d ip and port.get_lswitch_id() \u003d\u003d lswitch_id:"},{"line_number":104,"context_line":"                return port"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _get_gateway_port_by_ip(self, router, ip):"},{"line_number":109,"context_line":"        for port in router.get_ports():"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_147c9571","line":106,"range":{"start_line":106,"start_character":14,"end_line":106,"end_character":23},"updated":"2016-07-02 07:34:04.000000000","message":"Not suggest to use a common exception class. please use dragonflow-specific exception class instead.\nhttps://github.com/openstack/dragonflow/blob/master/dragonflow/common/exceptions.py\n\nAnd moreover, what if we just return None when the port is not found?","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"0ef14f515074a810fcca0685e2f2811c9ba4e4cf","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            if port.get_ip() \u003d\u003d ip and port.get_lswitch_id() \u003d\u003d lswitch_id:"},{"line_number":104,"context_line":"                return port"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _get_gateway_port_by_ip(self, router, ip):"},{"line_number":109,"context_line":"        for port in router.get_ports():"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_3c6738b8","line":106,"range":{"start_line":106,"start_character":14,"end_line":106,"end_character":23},"in_reply_to":"1aa78d24_147c9571","updated":"2016-07-07 03:07:51.000000000","message":"1. Done\n2. Then the caller need to check the return vale","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"bfca6526fda133977365352f989196732209b713","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            netmask \u003d port.get_cidr_netmask()"},{"line_number":111,"context_line":"            network \u003d port.get_cidr_network()"},{"line_number":112,"context_line":"            cidr \u003d netaddr.IPNetwork(ip + \u0027/\u0027 + netmask).cidr"},{"line_number":113,"context_line":"            if network \u003d\u003d str(cidr.network):"},{"line_number":114,"context_line":"                return port"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        raise Exception(\u0027Port not found\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_1703ea74","line":113,"updated":"2016-07-03 17:09:02.000000000","message":"Why not just use: netaddr.IPAddress(ip) in netaddr.IPNetwork(network + \u0027/\u0027 + netmask)? Or maybe I don\u0027t understand this code? Then the API can be made a bit cleaner with port.get_network or port.get_cidr.","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"0ef14f515074a810fcca0685e2f2811c9ba4e4cf","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            netmask \u003d port.get_cidr_netmask()"},{"line_number":111,"context_line":"            network \u003d port.get_cidr_network()"},{"line_number":112,"context_line":"            cidr \u003d netaddr.IPNetwork(ip + \u0027/\u0027 + netmask).cidr"},{"line_number":113,"context_line":"            if network \u003d\u003d str(cidr.network):"},{"line_number":114,"context_line":"                return port"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        raise Exception(\u0027Port not found\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_3c2a9890","line":113,"in_reply_to":"1aa78d24_1703ea74","updated":"2016-07-07 03:07:51.000000000","message":"Done","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"e88a2731288acef1a07283fd0d444c1a4c0f4f98","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            if network \u003d\u003d str(cidr.network):"},{"line_number":114,"context_line":"                return port"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def add_router_route(self, router, route):"},{"line_number":119,"context_line":"        LOG.info(_LI(\u0027Add extra route %(route)s for router %(router)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_d4e84d19","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":41},"updated":"2016-07-02 07:34:04.000000000","message":"ditto","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"0ef14f515074a810fcca0685e2f2811c9ba4e4cf","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            if network \u003d\u003d str(cidr.network):"},{"line_number":114,"context_line":"                return port"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        raise Exception(\u0027Port not found\u0027)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def add_router_route(self, router, route):"},{"line_number":119,"context_line":"        LOG.info(_LI(\u0027Add extra route %(route)s for router %(router)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_9cd62c26","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":41},"in_reply_to":"1aa78d24_d4e84d19","updated":"2016-07-07 03:07:51.000000000","message":"Done","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20405,"name":"liuhaixia","email":"liuhaixia315@huawei.com","username":"liuhaixia"},"change_message_id":"01c3b7deb13a956fbd8cfe4b44527656f255f854","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: router.__str__()})"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        datapath \u003d self.get_datapath()"},{"line_number":123,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":124,"context_line":"        parser \u003d datapath.ofproto_parser"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        destination \u003d route.get(\u0027destination\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_cd592590","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":38},"updated":"2016-07-07 02:50:17.000000000","message":"self.get_datapatch()-\u003e datapath","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"368d7f74405826bc686c9e24cb3ba084b3fcf342","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: router.__str__()})"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        datapath \u003d self.get_datapath()"},{"line_number":123,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":124,"context_line":"        parser \u003d datapath.ofproto_parser"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        destination \u003d route.get(\u0027destination\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_9fb9fece","line":123,"range":{"start_line":123,"start_character":17,"end_line":123,"end_character":38},"in_reply_to":"1aa78d24_cd592590","updated":"2016-07-07 03:09:14.000000000","message":"Done","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"bfca6526fda133977365352f989196732209b713","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":148,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":149,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":150,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IPV6,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_37354646","line":150,"updated":"2016-07-03 17:09:02.000000000","message":"The mac address should be this router\u0027s mac.","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"0ef14f515074a810fcca0685e2f2811c9ba4e4cf","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":148,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":149,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":150,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IPV6,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_3f50cad3","line":150,"in_reply_to":"1aa78d24_37354646","updated":"2016-07-07 03:07:51.000000000","message":"Done","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"bfca6526fda133977365352f989196732209b713","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IPV6,"},{"line_number":154,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":155,"context_line":"                                    ipv6_dst\u003d(dst_network, dst_netmask))"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_573c522f","line":153,"updated":"2016-07-03 17:09:02.000000000","message":"I think metadata needs to be matched here too.","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"0ef14f515074a810fcca0685e2f2811c9ba4e4cf","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IPV6,"},{"line_number":154,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":155,"context_line":"                                    ipv6_dst\u003d(dst_network, dst_netmask))"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_7f6412b8","line":153,"in_reply_to":"1aa78d24_573c522f","updated":"2016-07-07 03:07:51.000000000","message":"Done","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"bfca6526fda133977365352f989196732209b713","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        actions \u003d ["},{"line_number":158,"context_line":"            parser.OFPActionDecNwTtl(),"},{"line_number":159,"context_line":"            parser.OFPActionSetField(eth_dst\u003ddst_mac),"},{"line_number":160,"context_line":"            parser.OFPActionSetField(reg7\u003dtunnel_key),"},{"line_number":161,"context_line":"        ]"},{"line_number":162,"context_line":"        action_inst \u003d self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_d72fa2f4","line":159,"updated":"2016-07-03 17:09:02.000000000","message":"In theory, eth_src also needs to be modified.","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"0ef14f515074a810fcca0685e2f2811c9ba4e4cf","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        actions \u003d ["},{"line_number":158,"context_line":"            parser.OFPActionDecNwTtl(),"},{"line_number":159,"context_line":"            parser.OFPActionSetField(eth_dst\u003ddst_mac),"},{"line_number":160,"context_line":"            parser.OFPActionSetField(reg7\u003dtunnel_key),"},{"line_number":161,"context_line":"        ]"},{"line_number":162,"context_line":"        action_inst \u003d self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":12,"id":"1aa78d24_ffe5a208","line":159,"in_reply_to":"1aa78d24_d72fa2f4","updated":"2016-07-07 03:07:51.000000000","message":"because the next hop and the source port are in the same subnet, we needn\u0027t to change the source mac.","commit_id":"6062dfe8fc13c05ef6ebcd2cd797ac29ffd49c45"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"18ef83c5b10f375a48ee9f7730e51de608d31e27","unresolved":false,"context_lines":[{"line_number":379,"context_line":"            out_group\u003dofproto.OFPG_ANY,"},{"line_number":380,"context_line":"            match\u003dmatch)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def add_local_port(self, lport):"},{"line_number":383,"context_line":"        self._add_port(lport)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def add_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_7d1c9a13","line":382,"range":{"start_line":382,"start_character":8,"end_line":382,"end_character":22},"updated":"2016-07-19 08:04:11.000000000","message":"when adding new port, if the port\u0027s ip is same with existing route\u0027s nexthop, the route should be added","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"18ef83c5b10f375a48ee9f7730e51de608d31e27","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def add_local_port(self, lport):"},{"line_number":383,"context_line":"        self._add_port(lport)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def add_remote_port(self, lport):"},{"line_number":386,"context_line":"        self._add_port(lport)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def _add_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_5d271664","line":385,"range":{"start_line":385,"start_character":8,"end_line":385,"end_character":23},"updated":"2016-07-19 08:04:11.000000000","message":"ditto","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"18ef83c5b10f375a48ee9f7730e51de608d31e27","unresolved":false,"context_lines":[{"line_number":419,"context_line":"            priority\u003dconst.PRIORITY_HIGH,"},{"line_number":420,"context_line":"            match\u003dmatch)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    def remove_local_port(self, lport):"},{"line_number":423,"context_line":"        self._remove_port(lport)"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def remove_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_ddc9467a","line":422,"range":{"start_line":422,"start_character":8,"end_line":422,"end_character":25},"updated":"2016-07-19 08:04:11.000000000","message":"when removing port, if the port\u0027s ip is same with existing route\u0027s nexthop, the existing route should be deleted.","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"18ef83c5b10f375a48ee9f7730e51de608d31e27","unresolved":false,"context_lines":[{"line_number":422,"context_line":"    def remove_local_port(self, lport):"},{"line_number":423,"context_line":"        self._remove_port(lport)"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def remove_remote_port(self, lport):"},{"line_number":426,"context_line":"        self._remove_port(lport)"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"    def _remove_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_3dafc295","line":425,"range":{"start_line":425,"start_character":8,"end_line":425,"end_character":26},"updated":"2016-07-19 08:04:11.000000000","message":"ditto","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"},{"author":{"_account_id":21691,"name":"weizj","email":"wzj334965317@outlook.com","username":"ZhijunWei"},"change_message_id":"e7153eed4ebadd4ac7dd8ab8fd44e348be8e0ee3","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key is \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":150,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_53edf9b5","line":147,"range":{"start_line":147,"start_character":15,"end_line":147,"end_character":17},"updated":"2016-07-26 12:27:48.000000000","message":"i think \u0027\u003d\u003d\u0027 is better than is","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"14154e8e2873e1ea4eaa7014a43aee50cd49884f","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key is \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":150,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_a571670e","line":147,"range":{"start_line":147,"start_character":15,"end_line":147,"end_character":17},"in_reply_to":"dada55a8_53edf9b5","updated":"2016-07-26 23:38:25.000000000","message":"Done","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":21691,"name":"weizj","email":"wzj334965317@outlook.com","username":"ZhijunWei"},"change_message_id":"e7153eed4ebadd4ac7dd8ab8fd44e348be8e0ee3","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key is \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":150,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":151,"context_line":"        routes.add("},{"line_number":152,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_d337294b","line":149,"range":{"start_line":149,"start_character":17,"end_line":149,"end_character":19},"updated":"2016-07-26 12:27:48.000000000","message":"ditto","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"14154e8e2873e1ea4eaa7014a43aee50cd49884f","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key is \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":150,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":151,"context_line":"        routes.add("},{"line_number":152,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_05615339","line":149,"range":{"start_line":149,"start_character":17,"end_line":149,"end_character":19},"in_reply_to":"dada55a8_d337294b","updated":"2016-07-26 23:38:25.000000000","message":"Done","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":21691,"name":"weizj","email":"wzj334965317@outlook.com","username":"ZhijunWei"},"change_message_id":"e7153eed4ebadd4ac7dd8ab8fd44e348be8e0ee3","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        routes \u003d set()"},{"line_number":157,"context_line":"        if cached_router is None:"},{"line_number":158,"context_line":"            return"},{"line_number":159,"context_line":"        if key is \u0027added\u0027:"},{"line_number":160,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":161,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":162,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_73475dbc","line":159,"range":{"start_line":159,"start_character":15,"end_line":159,"end_character":17},"updated":"2016-07-26 12:27:48.000000000","message":"ditto","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"14154e8e2873e1ea4eaa7014a43aee50cd49884f","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        routes \u003d set()"},{"line_number":157,"context_line":"        if cached_router is None:"},{"line_number":158,"context_line":"            return"},{"line_number":159,"context_line":"        if key is \u0027added\u0027:"},{"line_number":160,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":161,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":162,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_e5651f45","line":159,"range":{"start_line":159,"start_character":15,"end_line":159,"end_character":17},"in_reply_to":"dada55a8_73475dbc","updated":"2016-07-26 23:38:25.000000000","message":"Done","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":21691,"name":"weizj","email":"wzj334965317@outlook.com","username":"ZhijunWei"},"change_message_id":"e7153eed4ebadd4ac7dd8ab8fd44e348be8e0ee3","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            return"},{"line_number":159,"context_line":"        if key is \u0027added\u0027:"},{"line_number":160,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":161,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":162,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":163,"context_line":"        routes.discard("},{"line_number":164,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_f3098d85","line":161,"range":{"start_line":161,"start_character":17,"end_line":161,"end_character":19},"updated":"2016-07-26 12:27:48.000000000","message":"ditto","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"14154e8e2873e1ea4eaa7014a43aee50cd49884f","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            return"},{"line_number":159,"context_line":"        if key is \u0027added\u0027:"},{"line_number":160,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":161,"context_line":"        elif key is \u0027to_add\u0027:"},{"line_number":162,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":163,"context_line":"        routes.discard("},{"line_number":164,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_4557cb59","line":161,"range":{"start_line":161,"start_character":17,"end_line":161,"end_character":19},"in_reply_to":"dada55a8_f3098d85","updated":"2016-07-26 23:38:25.000000000","message":"Done","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":21691,"name":"weizj","email":"wzj334965317@outlook.com","username":"ZhijunWei"},"change_message_id":"e7153eed4ebadd4ac7dd8ab8fd44e348be8e0ee3","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        if deleted:"},{"line_number":336,"context_line":"            self._del_from_route_cache(\u0027added\u0027, router, route)"},{"line_number":337,"context_line":"        else:"},{"line_number":338,"context_line":"            self._del_froM_route_cache(\u0027to_add\u0027, router, route)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def _install_flow_send_to_output_table(self, network_id,"},{"line_number":341,"context_line":"                                           tunnel_key, dst_ip):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_53721912","line":338,"range":{"start_line":338,"start_character":17,"end_line":338,"end_character":38},"updated":"2016-07-26 12:27:48.000000000","message":"from","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"14154e8e2873e1ea4eaa7014a43aee50cd49884f","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        if deleted:"},{"line_number":336,"context_line":"            self._del_from_route_cache(\u0027added\u0027, router, route)"},{"line_number":337,"context_line":"        else:"},{"line_number":338,"context_line":"            self._del_froM_route_cache(\u0027to_add\u0027, router, route)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def _install_flow_send_to_output_table(self, network_id,"},{"line_number":341,"context_line":"                                           tunnel_key, dst_ip):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_255c577c","line":338,"range":{"start_line":338,"start_character":17,"end_line":338,"end_character":38},"in_reply_to":"dada55a8_53721912","updated":"2016-07-26 23:38:25.000000000","message":"Done","commit_id":"599c00cfbe12d0e08ed29789e50b4154d2663a92"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c2240648e472210db024384da5d049effd906276","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        for port in ports:"},{"line_number":127,"context_line":"            if port.get_ip() \u003d\u003d ip and port.get_lswitch_id() \u003d\u003d lswitch_id:"},{"line_number":128,"context_line":"                return port"},{"line_number":129,"context_line":"        return None"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _get_gateway_port_by_ip(self, router, ip):"},{"line_number":132,"context_line":"        for port in router.get_ports():"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_91527a65","line":129,"range":{"start_line":129,"start_character":0,"end_line":129,"end_character":19},"updated":"2016-08-02 01:08:10.000000000","message":"nit: this is not required, silently return is None","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        for port in ports:"},{"line_number":127,"context_line":"            if port.get_ip() \u003d\u003d ip and port.get_lswitch_id() \u003d\u003d lswitch_id:"},{"line_number":128,"context_line":"                return port"},{"line_number":129,"context_line":"        return None"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _get_gateway_port_by_ip(self, router, ip):"},{"line_number":132,"context_line":"        for port in router.get_ports():"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_12512d0f","line":129,"range":{"start_line":129,"start_character":0,"end_line":129,"end_character":19},"in_reply_to":"bacf61ea_91527a65","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c2240648e472210db024384da5d049effd906276","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    # route cache got following structure"},{"line_number":141,"context_line":"    # {router: {\u0027added\u0027: set(route), \u0027to_add\u0027: set(route)}"},{"line_number":142,"context_line":"    def _add_to_route_cache(self, key, router, route):"},{"line_number":143,"context_line":"        cached_router \u003d self.route_cache.get(router, None)"},{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_d1a4f24b","line":143,"range":{"start_line":143,"start_character":53,"end_line":143,"end_character":57},"updated":"2016-08-02 01:08:10.000000000","message":"nit: this is not required, get will return None by default.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    # route cache got following structure"},{"line_number":141,"context_line":"    # {router: {\u0027added\u0027: set(route), \u0027to_add\u0027: set(route)}"},{"line_number":142,"context_line":"    def _add_to_route_cache(self, key, router, route):"},{"line_number":143,"context_line":"        cached_router \u003d self.route_cache.get(router, None)"},{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_f28f3173","line":143,"range":{"start_line":143,"start_character":53,"end_line":143,"end_character":57},"in_reply_to":"bacf61ea_d1a4f24b","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        cached_router \u003d self.route_cache.get(router, None)"},{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key \u003d\u003d \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key \u003d\u003d \u0027to_add\u0027:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_6cb2c507","line":146,"range":{"start_line":146,"start_character":0,"end_line":146,"end_character":72},"updated":"2016-08-01 06:12:58.000000000","message":"If you change this block to:\n    cached_router \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set() }\n    self.route_cache[router] \u003d cached_router","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        cached_router \u003d self.route_cache.get(router, None)"},{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key \u003d\u003d \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key \u003d\u003d \u0027to_add\u0027:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_5248c587","line":146,"range":{"start_line":146,"start_character":0,"end_line":146,"end_character":72},"in_reply_to":"bacf61ea_6cb2c507","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key \u003d\u003d \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key \u003d\u003d \u0027to_add\u0027:"},{"line_number":150,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":151,"context_line":"        routes.add("},{"line_number":152,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_4cb701f5","line":150,"range":{"start_line":147,"start_character":0,"end_line":150,"end_character":59},"updated":"2016-08-01 06:12:58.000000000","message":"And this code to:\n    routes \u003d cached_router[key]\n\nThe method would be much simpler, and \u0027routes \u003d set()\u0027 above would be redundant.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        routes \u003d set()"},{"line_number":145,"context_line":"        if cached_router is None:"},{"line_number":146,"context_line":"            self.route_cache[router] \u003d {\u0027added\u0027: set(), \u0027to_add\u0027: set()}"},{"line_number":147,"context_line":"        if key \u003d\u003d \u0027added\u0027:"},{"line_number":148,"context_line":"            routes \u003d self.route_cache[router].get(\u0027added\u0027)"},{"line_number":149,"context_line":"        elif key \u003d\u003d \u0027to_add\u0027:"},{"line_number":150,"context_line":"            routes \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":151,"context_line":"        routes.add("},{"line_number":152,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_b25db94a","line":150,"range":{"start_line":147,"start_character":0,"end_line":150,"end_character":59},"in_reply_to":"bacf61ea_4cb701f5","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        routes.add("},{"line_number":152,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _del_from_route_cache(self, key, router, route):"},{"line_number":155,"context_line":"        cached_router \u003d self.route_cache.get(router, None)"},{"line_number":156,"context_line":"        routes \u003d set()"},{"line_number":157,"context_line":"        if cached_router is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_8ccd7987","line":154,"updated":"2016-08-01 06:12:58.000000000","message":"Same here as in _add_to_route_cache (Or very similar)","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        routes.add("},{"line_number":152,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _del_from_route_cache(self, key, router, route):"},{"line_number":155,"context_line":"        cached_router \u003d self.route_cache.get(router, None)"},{"line_number":156,"context_line":"        routes \u003d set()"},{"line_number":157,"context_line":"        if cached_router is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_259a25c6","line":154,"in_reply_to":"bacf61ea_8ccd7987","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _reprocess_to_add_route(self, topic, port_ip):"},{"line_number":167,"context_line":"        LOG.info(_LI(\u0027reprocess to add routes again\u0027))"},{"line_number":168,"context_line":"        for router in self.db_store.get_routes(topic):"},{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_0ca8698c","line":167,"range":{"start_line":167,"start_character":0,"end_line":167,"end_character":54},"updated":"2016-08-01 06:12:58.000000000","message":"Shouldn\u0027t this be \u0027debug\u0027?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            (route.get(\u0027destination\u0027), route.get(\u0027nexthop\u0027)))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _reprocess_to_add_route(self, topic, port_ip):"},{"line_number":167,"context_line":"        LOG.info(_LI(\u0027reprocess to add routes again\u0027))"},{"line_number":168,"context_line":"        for router in self.db_store.get_routes(topic):"},{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_85d95986","line":167,"range":{"start_line":167,"start_character":0,"end_line":167,"end_character":54},"in_reply_to":"bacf61ea_0ca8698c","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _reprocess_to_add_route(self, topic, port_ip):"},{"line_number":167,"context_line":"        LOG.info(_LI(\u0027reprocess to add routes again\u0027))"},{"line_number":168,"context_line":"        for router in self.db_store.get_routes(topic):"},{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"},{"line_number":171,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_ac7e7d16","line":168,"range":{"start_line":168,"start_character":36,"end_line":168,"end_character":46},"updated":"2016-08-01 06:12:58.000000000","message":"I can\u0027t find this method in db_store.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _reprocess_to_add_route(self, topic, port_ip):"},{"line_number":167,"context_line":"        LOG.info(_LI(\u0027reprocess to add routes again\u0027))"},{"line_number":168,"context_line":"        for router in self.db_store.get_routes(topic):"},{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"},{"line_number":171,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac371cc_65affd7d","line":168,"range":{"start_line":168,"start_character":36,"end_line":168,"end_character":46},"in_reply_to":"bacf61ea_ac7e7d16","updated":"2016-08-22 13:26:18.000000000","message":"should be get_routers","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def _reprocess_to_add_route(self, topic, port_ip):"},{"line_number":167,"context_line":"        LOG.info(_LI(\u0027reprocess to add routes again\u0027))"},{"line_number":168,"context_line":"        for router in self.db_store.get_routes(topic):"},{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"},{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":"            routes_to_add \u003d self.route_cache[router].get(\u0027to_add\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_4c5d4178","line":169,"range":{"start_line":169,"start_character":49,"end_line":169,"end_character":55},"updated":"2016-08-01 06:12:58.000000000","message":"Please do not use objects as dictionary keys. Use router id instead.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    def _reprocess_to_add_route(self, topic, port_ip):"},{"line_number":167,"context_line":"        LOG.info(_LI(\u0027reprocess to add routes again\u0027))"},{"line_number":168,"context_line":"        for router in self.db_store.get_routes(topic):"},{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"},{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":"            routes_to_add \u003d self.route_cache[router].get(\u0027to_add\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_1baaaa70","line":169,"range":{"start_line":169,"start_character":49,"end_line":169,"end_character":55},"in_reply_to":"bacf61ea_4c5d4178","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"},{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":"            routes_to_add \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":173,"context_line":"            LOG.info(_LI(\u0027routes to add: %s\u0027), str(routes_to_add))"},{"line_number":174,"context_line":"            for route in copy.deepcopy(routes_to_add):"},{"line_number":175,"context_line":"                if port_ip !\u003d route[1]:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_cce01199","line":172,"range":{"start_line":172,"start_character":28,"end_line":172,"end_character":66},"updated":"2016-08-01 06:12:58.000000000","message":"why not use cached_router[\u0027to_add\u0027] here?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"},{"line_number":170,"context_line":"            if cached_router is None:"},{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":"            routes_to_add \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":173,"context_line":"            LOG.info(_LI(\u0027routes to add: %s\u0027), str(routes_to_add))"},{"line_number":174,"context_line":"            for route in copy.deepcopy(routes_to_add):"},{"line_number":175,"context_line":"                if port_ip !\u003d route[1]:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_5bba62c1","line":172,"range":{"start_line":172,"start_character":28,"end_line":172,"end_character":66},"in_reply_to":"bacf61ea_cce01199","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":"            routes_to_add \u003d self.route_cache[router].get(\u0027to_add\u0027)"},{"line_number":173,"context_line":"            LOG.info(_LI(\u0027routes to add: %s\u0027), str(routes_to_add))"},{"line_number":174,"context_line":"            for route in copy.deepcopy(routes_to_add):"},{"line_number":175,"context_line":"                if port_ip !\u003d route[1]:"},{"line_number":176,"context_line":"                    continue"},{"line_number":177,"context_line":"                route_dict \u003d dict(zip([\u0027destination\u0027, \u0027nexthop\u0027], route))"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_0c6a29ee","line":174,"updated":"2016-08-01 06:12:58.000000000","message":"Why do you need a *deep* copy?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            for route in copy.deepcopy(routes_to_add):"},{"line_number":175,"context_line":"                if port_ip !\u003d route[1]:"},{"line_number":176,"context_line":"                    continue"},{"line_number":177,"context_line":"                route_dict \u003d dict(zip([\u0027destination\u0027, \u0027nexthop\u0027], route))"},{"line_number":178,"context_line":"                added \u003d self._add_route_route(router, route_dict)"},{"line_number":179,"context_line":"                if added:"},{"line_number":180,"context_line":"                    self._add_to_route_cache(\u0027added\u0027, router, route_dict)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_ac8b1dc2","line":177,"range":{"start_line":177,"start_character":0,"end_line":177,"end_character":73},"updated":"2016-08-01 06:12:58.000000000","message":"Why not just store it as a dict to begin with? (Instead of a tuple)","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            for route in copy.deepcopy(routes_to_add):"},{"line_number":175,"context_line":"                if port_ip !\u003d route[1]:"},{"line_number":176,"context_line":"                    continue"},{"line_number":177,"context_line":"                route_dict \u003d dict(zip([\u0027destination\u0027, \u0027nexthop\u0027], route))"},{"line_number":178,"context_line":"                added \u003d self._add_route_route(router, route_dict)"},{"line_number":179,"context_line":"                if added:"},{"line_number":180,"context_line":"                    self._add_to_route_cache(\u0027added\u0027, router, route_dict)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_4e1c6277","line":177,"range":{"start_line":177,"start_character":0,"end_line":177,"end_character":73},"in_reply_to":"bacf61ea_ac8b1dc2","updated":"2016-08-22 13:26:18.000000000","message":"Heshan may think it is smaller, therefore faster to locate and process. We can keep it.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                added \u003d self._add_route_route(router, route_dict)"},{"line_number":179,"context_line":"                if added:"},{"line_number":180,"context_line":"                    self._add_to_route_cache(\u0027added\u0027, router, route_dict)"},{"line_number":181,"context_line":"                    self._del_from_route_cache(\u0027to_add\u0027, router, route_dict)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _reprocess_to_del_route(self, topic, port_ip):"},{"line_number":184,"context_line":"        LOG.info(_LI(\u0027reprocess to del routes again\u0027))"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_2c4c4d9d","line":181,"updated":"2016-08-01 06:12:58.000000000","message":"Please make \u0027added\u0027 and \u0027to_add\u0027 constant values.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                added \u003d self._add_route_route(router, route_dict)"},{"line_number":179,"context_line":"                if added:"},{"line_number":180,"context_line":"                    self._add_to_route_cache(\u0027added\u0027, router, route_dict)"},{"line_number":181,"context_line":"                    self._del_from_route_cache(\u0027to_add\u0027, router, route_dict)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _reprocess_to_del_route(self, topic, port_ip):"},{"line_number":184,"context_line":"        LOG.info(_LI(\u0027reprocess to del routes again\u0027))"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_f1decf6b","line":181,"in_reply_to":"bacf61ea_2c4c4d9d","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                    self._add_to_route_cache(\u0027added\u0027, router, route_dict)"},{"line_number":181,"context_line":"                    self._del_from_route_cache(\u0027to_add\u0027, router, route_dict)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _reprocess_to_del_route(self, topic, port_ip):"},{"line_number":184,"context_line":"        LOG.info(_LI(\u0027reprocess to del routes again\u0027))"},{"line_number":185,"context_line":"        for router in self.db_store.get_routers(topic):"},{"line_number":186,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_ec56b528","line":183,"updated":"2016-08-01 06:12:58.000000000","message":"Same comments as in _reprocess_to_add_route (or very similar)","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                    self._add_to_route_cache(\u0027added\u0027, router, route_dict)"},{"line_number":181,"context_line":"                    self._del_from_route_cache(\u0027to_add\u0027, router, route_dict)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _reprocess_to_del_route(self, topic, port_ip):"},{"line_number":184,"context_line":"        LOG.info(_LI(\u0027reprocess to del routes again\u0027))"},{"line_number":185,"context_line":"        for router in self.db_store.get_routers(topic):"},{"line_number":186,"context_line":"            cached_router \u003d self.route_cache.get(router, None)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_11e44b39","line":183,"in_reply_to":"bacf61ea_ec56b528","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        return True"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def add_router_route(self, router, route):"},{"line_number":266,"context_line":"        LOG.info(_LI(\u0027Add extra route %(route)s for router %(router)s\u0027) %"},{"line_number":267,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        added \u003d self._add_router_route(router, route)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_ef1b4771","line":266,"range":{"start_line":266,"start_character":72,"end_line":266,"end_character":73},"updated":"2016-08-01 06:12:58.000000000","message":"Do not use % when using LOG. Send the parameters to LOG.info, and let it do the formatting.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        return True"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def add_router_route(self, router, route):"},{"line_number":266,"context_line":"        LOG.info(_LI(\u0027Add extra route %(route)s for router %(router)s\u0027) %"},{"line_number":267,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        added \u003d self._add_router_route(router, route)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_1173ab4e","line":266,"range":{"start_line":266,"start_character":72,"end_line":266,"end_character":73},"in_reply_to":"bacf61ea_ef1b4771","updated":"2016-08-22 13:26:18.000000000","message":"Can you explain it in detail?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"12461d6bb9a2bd5f11b9af38bfad8820c1c86f9e","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        return True"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @ExceptionCapturer"},{"line_number":330,"context_line":"    def remove_router_route(self, router, route):"},{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_a06055a6","line":329,"range":{"start_line":329,"start_character":4,"end_line":329,"end_character":22},"updated":"2016-07-30 11:22:43.000000000","message":"Oh, my god. Please remove this decorator. The ryu application manager will raise the exception below because it cannot identify the decorated interface.\n\nTypeError: wrapper() got an unexpected keyword argument \u0027router\u0027","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        return True"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @ExceptionCapturer"},{"line_number":330,"context_line":"    def remove_router_route(self, router, route):"},{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_91b4bbd1","line":329,"range":{"start_line":329,"start_character":4,"end_line":329,"end_character":22},"in_reply_to":"bacf61ea_a06055a6","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @ExceptionCapturer"},{"line_number":330,"context_line":"    def remove_router_route(self, router, route):"},{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        deleted \u003d self._remove_router_route(router, route)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_2f28bf85","line":331,"range":{"start_line":331,"start_character":76,"end_line":331,"end_character":77},"updated":"2016-08-01 06:12:58.000000000","message":"Same here re: LOG usage","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @ExceptionCapturer"},{"line_number":330,"context_line":"    def remove_router_route(self, router, route):"},{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        deleted \u003d self._remove_router_route(router, route)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_11c1eb2e","line":331,"range":{"start_line":331,"start_character":76,"end_line":331,"end_character":77},"in_reply_to":"bacf61ea_2f28bf85","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c2240648e472210db024384da5d049effd906276","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    @ExceptionCapturer"},{"line_number":330,"context_line":"    def remove_router_route(self, router, route):"},{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        deleted \u003d self._remove_router_route(router, route)"},{"line_number":335,"context_line":"        if deleted:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_63945d8a","line":332,"range":{"start_line":332,"start_character":48,"end_line":332,"end_character":54},"updated":"2016-08-02 01:08:10.000000000","message":"I don\u0027t think it is good to record the router object in the log, just router_id might be enough.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    @ExceptionCapturer"},{"line_number":330,"context_line":"    def remove_router_route(self, router, route):"},{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        deleted \u003d self._remove_router_route(router, route)"},{"line_number":335,"context_line":"        if deleted:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_9102fb6d","line":332,"range":{"start_line":332,"start_character":48,"end_line":332,"end_character":54},"in_reply_to":"bacf61ea_63945d8a","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        deleted \u003d self._remove_router_route(router, route)"},{"line_number":335,"context_line":"        if deleted:"},{"line_number":336,"context_line":"            self._del_from_route_cache(\u0027added\u0027, router, route)"},{"line_number":337,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_0f54dbfc","line":334,"updated":"2016-08-01 06:12:58.000000000","message":"Not sure I understand this code. Shouldn\u0027t it always be removed from \u0027to_add\u0027 cache? Shouldn\u0027t we try again if there is a route in \u0027added\u0027 for which deletion failed?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        deleted \u003d self._remove_router_route(router, route)"},{"line_number":335,"context_line":"        if deleted:"},{"line_number":336,"context_line":"            self._del_from_route_cache(\u0027added\u0027, router, route)"},{"line_number":337,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_514ec396","line":334,"in_reply_to":"bacf61ea_0f54dbfc","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"11dc381f9b4d6a83b2eb449a5f971d2fa484b1a8","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        LOG.info(_LI(\u0027Delete extra route %(route)s from router %(router)s\u0027) %"},{"line_number":332,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        deleted \u003d self._remove_router_route(router, route)"},{"line_number":335,"context_line":"        if deleted:"},{"line_number":336,"context_line":"            self._del_from_route_cache(\u0027added\u0027, router, route)"},{"line_number":337,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_a4d5091d","line":334,"in_reply_to":"bacf61ea_0f54dbfc","updated":"2016-08-23 05:02:12.000000000","message":"if the return value of _remove_router_route is true, that means the route\u0027s nexthop is exist, and that route is stored in \u0027added\u0027 cache, otherwise it\u0027s stored in \u0027to_add\u0027 cache. so here we need to make choice according to the return value.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            match\u003dmatch)"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"    def add_local_port(self, lport):"},{"line_number":469,"context_line":"        LOG.info(_LI(\u0027add local port: %s\u0027), str(lport))"},{"line_number":470,"context_line":"        self._add_port(lport)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def add_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_ef6067d1","line":469,"updated":"2016-08-01 06:12:58.000000000","message":"Shouldn\u0027t this be a debug?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":466,"context_line":"            match\u003dmatch)"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"    def add_local_port(self, lport):"},{"line_number":469,"context_line":"        LOG.info(_LI(\u0027add local port: %s\u0027), str(lport))"},{"line_number":470,"context_line":"        self._add_port(lport)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def add_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_3108672c","line":469,"in_reply_to":"bacf61ea_ef6067d1","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        self._add_port(lport)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def add_remote_port(self, lport):"},{"line_number":473,"context_line":"        LOG.info(_LI(\u0027add remote port: %s\u0027), str(lport))"},{"line_number":474,"context_line":"        self._add_port(lport)"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    def _add_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_4fa893db","line":473,"updated":"2016-08-01 06:12:58.000000000","message":"Same here","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        self._add_port(lport)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def add_remote_port(self, lport):"},{"line_number":473,"context_line":"        LOG.info(_LI(\u0027add remote port: %s\u0027), str(lport))"},{"line_number":474,"context_line":"        self._add_port(lport)"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    def _add_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_1103ab10","line":473,"in_reply_to":"bacf61ea_4fa893db","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":515,"context_line":"            match\u003dmatch)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def remove_local_port(self, lport):"},{"line_number":518,"context_line":"        LOG.info(_LI(\u0027remove local port:%s\u0027), str(lport))"},{"line_number":519,"context_line":"        self._remove_port(lport)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def remove_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_4f7ff365","line":518,"updated":"2016-08-01 06:12:58.000000000","message":"Same here re: debug","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":515,"context_line":"            match\u003dmatch)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def remove_local_port(self, lport):"},{"line_number":518,"context_line":"        LOG.info(_LI(\u0027remove local port:%s\u0027), str(lport))"},{"line_number":519,"context_line":"        self._remove_port(lport)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def remove_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_6c03260e","line":518,"in_reply_to":"bacf61ea_4f7ff365","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":519,"context_line":"        self._remove_port(lport)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def remove_remote_port(self, lport):"},{"line_number":522,"context_line":"        LOG.info(_LI(\u0027remove remote port:%s\u0027), str(lport))"},{"line_number":523,"context_line":"        self._remove_port(lport)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _remove_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_af982fc1","line":522,"updated":"2016-08-01 06:12:58.000000000","message":"Same here re: debug","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":519,"context_line":"        self._remove_port(lport)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def remove_remote_port(self, lport):"},{"line_number":522,"context_line":"        LOG.info(_LI(\u0027remove remote port:%s\u0027), str(lport))"},{"line_number":523,"context_line":"        self._remove_port(lport)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"    def _remove_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_0c15523f","line":522,"in_reply_to":"bacf61ea_af982fc1","updated":"2016-08-22 13:26:18.000000000","message":"Done","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                    router_port.get_mac())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _get_port(self, ip, lswitch_id, topic):"},{"line_number":126,"context_line":"        ports \u003d self.db_store.get_ports(topic)"},{"line_number":127,"context_line":"        for port in ports:"},{"line_number":128,"context_line":"            if port.get_ip() \u003d\u003d ip and port.get_lswitch_id() \u003d\u003d lswitch_id:"},{"line_number":129,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_572a4a91","line":126,"range":{"start_line":126,"start_character":8,"end_line":126,"end_character":46},"updated":"2016-08-25 13:46:47.000000000","message":"If the port is not in the same tenant  as router, this line will not return the port here. And the flow will not be added.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"de05f638def56a3695e3b7e86ce15851b1c3e13c","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                    router_port.get_mac())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _get_port(self, ip, lswitch_id, topic):"},{"line_number":126,"context_line":"        ports \u003d self.db_store.get_ports(topic)"},{"line_number":127,"context_line":"        for port in ports:"},{"line_number":128,"context_line":"            if port.get_ip() \u003d\u003d ip and port.get_lswitch_id() \u003d\u003d lswitch_id:"},{"line_number":129,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_82f22f99","line":126,"range":{"start_line":126,"start_character":8,"end_line":126,"end_character":46},"in_reply_to":"1ac06dbe_572a4a91","updated":"2016-08-26 01:41:34.000000000","message":"this function is used to get port according to the nexthop of route, so both the route and nexthop should belong to the same tenant.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":227,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":228,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":229,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":230,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_b2b90cef","line":229,"range":{"start_line":229,"start_character":0,"end_line":229,"end_character":72},"updated":"2016-08-25 13:46:47.000000000","message":"This line should not be int he match, router extra route is meant to   be used by all subnets that are connected to the router.  If this line is added, only the subnet of the nexthop can use that route, which is different from neutron router behavior.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"de05f638def56a3695e3b7e86ce15851b1c3e13c","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":227,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":228,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":229,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":230,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_3db988ea","line":229,"range":{"start_line":229,"start_character":0,"end_line":229,"end_character":72},"in_reply_to":"1ac06dbe_b2b90cef","updated":"2016-08-26 01:41:34.000000000","message":"here we want to implement policy route, so source network should be matched.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        dst_network \u003d destination.network"},{"line_number":223,"context_line":"        dst_netmask \u003d destination.netmask"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        if destination.version \u003d\u003d 4:"},{"line_number":226,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":227,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":228,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":229,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":230,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        else:"},{"line_number":233,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IPV6,"},{"line_number":234,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":235,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":236,"context_line":"                                    ipv6_src\u003d(src_network, src_netmask),"},{"line_number":237,"context_line":"                                    ipv6_dst\u003d(dst_network, dst_netmask))"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        actions \u003d ["},{"line_number":240,"context_line":"            parser.OFPActionDecNwTtl(),"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_4c72c112","line":237,"range":{"start_line":225,"start_character":0,"end_line":237,"end_character":72},"updated":"2016-08-25 13:46:47.000000000","message":"this could be \n\neth_type \u003d ether.ETH_TYPE_IP if destination.version \u003d\u003d 4 else eth_type\u003dether.ETH_TYPE_IPV6\nmatch \u003d parser.OFPMatch(eth_type\u003deth_type,\n                                    metadata\u003dnetwork_id,\n                                    eth_dst\u003drouter_if_mac,\n                                    ipv6_src\u003d(src_network, src_netmask),\n                                    ipv6_dst\u003d(dst_network, dst_netmask))","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"4b3b8b3800896a40685a72c9163cc632b32d6d71","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        dst_network \u003d destination.network"},{"line_number":223,"context_line":"        dst_netmask \u003d destination.netmask"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        if destination.version \u003d\u003d 4:"},{"line_number":226,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":227,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":228,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":229,"context_line":"                                    ipv4_src\u003d(src_network, src_netmask),"},{"line_number":230,"context_line":"                                    ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        else:"},{"line_number":233,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IPV6,"},{"line_number":234,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":235,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":236,"context_line":"                                    ipv6_src\u003d(src_network, src_netmask),"},{"line_number":237,"context_line":"                                    ipv6_dst\u003d(dst_network, dst_netmask))"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        actions \u003d ["},{"line_number":240,"context_line":"            parser.OFPActionDecNwTtl(),"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_73925f59","line":237,"range":{"start_line":225,"start_character":0,"end_line":237,"end_character":72},"in_reply_to":"1ac06dbe_4c72c112","updated":"2016-08-26 02:28:19.000000000","message":"Done","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            parser.OFPActionSetField(eth_dst\u003ddst_mac),"},{"line_number":242,"context_line":"            parser.OFPActionSetField(reg7\u003dtunnel_key),"},{"line_number":243,"context_line":"        ]"},{"line_number":244,"context_line":"        action_inst \u003d self.get_datapath().ofproto_parser.OFPInstructionActions("},{"line_number":245,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, actions)"},{"line_number":246,"context_line":"        goto_inst \u003d parser.OFPInstructionGotoTable(const.EGRESS_TABLE)"},{"line_number":247,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_8cc95928","line":244,"range":{"start_line":244,"start_character":22,"end_line":244,"end_character":56},"updated":"2016-08-25 13:46:47.000000000","message":"This could be replaced with parser, since it is assigned at line 199","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"4b3b8b3800896a40685a72c9163cc632b32d6d71","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            parser.OFPActionSetField(eth_dst\u003ddst_mac),"},{"line_number":242,"context_line":"            parser.OFPActionSetField(reg7\u003dtunnel_key),"},{"line_number":243,"context_line":"        ]"},{"line_number":244,"context_line":"        action_inst \u003d self.get_datapath().ofproto_parser.OFPInstructionActions("},{"line_number":245,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, actions)"},{"line_number":246,"context_line":"        goto_inst \u003d parser.OFPInstructionGotoTable(const.EGRESS_TABLE)"},{"line_number":247,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_73797f2f","line":244,"range":{"start_line":244,"start_character":22,"end_line":244,"end_character":56},"in_reply_to":"1ac06dbe_8cc95928","updated":"2016-08-26 02:28:19.000000000","message":"Done","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"d0f697354424d8f991ffad68a40ee10a843d6205","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        self._remove_router_route(router, route)"},{"line_number":328,"context_line":"        self._del_from_route_cache(ROUTE_ADDED, router.get_id(), route)"},{"line_number":329,"context_line":"        self._del_from_route_cache(ROUTE_TO_ADD, router.get_id(), route)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _install_flow_send_to_output_table(self, network_id,"},{"line_number":332,"context_line":"                                           tunnel_key, dst_ip):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_04ce9d81","line":329,"range":{"start_line":328,"start_character":0,"end_line":329,"end_character":72},"updated":"2016-08-23 05:04:30.000000000","message":"it\u0027s need to check the return value of _remove_router_route to choose to delete from which cache(\u0027added\u0027 or \u0027to_add\u0027)","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"7dce41882a3493175371575fbb8b8fec3e97562c","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        self._remove_router_route(router, route)"},{"line_number":328,"context_line":"        self._del_from_route_cache(ROUTE_ADDED, router.get_id(), route)"},{"line_number":329,"context_line":"        self._del_from_route_cache(ROUTE_TO_ADD, router.get_id(), route)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _install_flow_send_to_output_table(self, network_id,"},{"line_number":332,"context_line":"                                           tunnel_key, dst_ip):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_14f4be58","line":329,"range":{"start_line":328,"start_character":0,"end_line":329,"end_character":72},"in_reply_to":"1ac06dbe_04ce9d81","updated":"2016-08-24 02:54:15.000000000","message":"This is to remove the cached route completely, no matter added or to be added.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"f74a52cd403a461f75e669093f33c887d85f65d7","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        self._remove_router_route(router, route)"},{"line_number":328,"context_line":"        self._del_from_route_cache(ROUTE_ADDED, router.get_id(), route)"},{"line_number":329,"context_line":"        self._del_from_route_cache(ROUTE_TO_ADD, router.get_id(), route)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _install_flow_send_to_output_table(self, network_id,"},{"line_number":332,"context_line":"                                           tunnel_key, dst_ip):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_7930419f","line":329,"range":{"start_line":328,"start_character":0,"end_line":329,"end_character":72},"in_reply_to":"1ac06dbe_14f4be58","updated":"2016-08-25 00:47:47.000000000","message":"ok. then the return value of _del_froM_route_cache is not needed.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"e0abb79a11b295114077c824de8d8c1fbe91ffcc","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                 {\u0027route\u0027: route, \u0027router\u0027: str(router)})"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        self._remove_router_route(router, route)"},{"line_number":328,"context_line":"        self._del_from_route_cache(ROUTE_ADDED, router.get_id(), route)"},{"line_number":329,"context_line":"        self._del_from_route_cache(ROUTE_TO_ADD, router.get_id(), route)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    def _install_flow_send_to_output_table(self, network_id,"},{"line_number":332,"context_line":"                                           tunnel_key, dst_ip):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_a78287c6","line":329,"range":{"start_line":328,"start_character":0,"end_line":329,"end_character":72},"in_reply_to":"1ac06dbe_7930419f","updated":"2016-08-25 07:07:45.000000000","message":"Done","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                                metadata\u003dnetwork_id,"},{"line_number":231,"context_line":"                                eth_dst\u003drouter_if_mac,"},{"line_number":232,"context_line":"                                ipv4_src\u003d(src_network, src_netmask),"},{"line_number":233,"context_line":"                                ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        actions \u003d ["},{"line_number":236,"context_line":"            parser.OFPActionDecNwTtl(),"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_ab3ecbd7","line":233,"updated":"2016-09-12 11:21:46.000000000","message":"ipv4_src and ipv4_dst, even when L3 is ipv6?","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                                metadata\u003dnetwork_id,"},{"line_number":231,"context_line":"                                eth_dst\u003drouter_if_mac,"},{"line_number":232,"context_line":"                                ipv4_src\u003d(src_network, src_netmask),"},{"line_number":233,"context_line":"                                ipv4_dst\u003d(dst_network, dst_netmask))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        actions \u003d ["},{"line_number":236,"context_line":"            parser.OFPActionDecNwTtl(),"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_28ef6be9","line":233,"in_reply_to":"9a89bdaa_ab3ecbd7","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":304,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":305,"context_line":"                                    ipv6_src\u003d(src_network, src_netmask),"},{"line_number":306,"context_line":"                                    ipv6_dst\u003d(dst_network, dst_netmask))"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.mod_flow("},{"line_number":309,"context_line":"            self.get_datapath(),"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_6b4da398","line":306,"updated":"2016-09-12 11:21:46.000000000","message":"The code that constructs the match object can be moved out to a method.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":304,"context_line":"                                    eth_dst\u003drouter_if_mac,"},{"line_number":305,"context_line":"                                    ipv6_src\u003d(src_network, src_netmask),"},{"line_number":306,"context_line":"                                    ipv6_dst\u003d(dst_network, dst_netmask))"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.mod_flow("},{"line_number":309,"context_line":"            self.get_datapath(),"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_4be9111a","line":306,"in_reply_to":"9a89bdaa_6b4da398","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":453,"context_line":"            match\u003dmatch)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def add_local_port(self, lport):"},{"line_number":456,"context_line":"        LOG.debug(\u0027add local port: %s\u0027, str(lport))"},{"line_number":457,"context_line":"        self._add_port(lport)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def add_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_cb0cef44","line":456,"updated":"2016-09-12 11:21:46.000000000","message":"nit: You don\u0027t need str here.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":453,"context_line":"            match\u003dmatch)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def add_local_port(self, lport):"},{"line_number":456,"context_line":"        LOG.debug(\u0027add local port: %s\u0027, str(lport))"},{"line_number":457,"context_line":"        self._add_port(lport)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def add_remote_port(self, lport):"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_4b5e71ea","line":456,"in_reply_to":"9a89bdaa_cb0cef44","updated":"2016-09-14 10:53:18.000000000","message":"Done","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"}],"dragonflow/controller/ryu_base_app.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c2240648e472210db024384da5d049effd906276","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def notify_add_router_route(self, router\u003dNone, route\u003dNone):"},{"line_number":121,"context_line":"        self.dispatcher.dispatch(\u0027add_router_route\u0027,"},{"line_number":122,"context_line":"                                 router\u003drouter,"},{"line_number":123,"context_line":"                                 route\u003droute)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def notify_remove_router_route(self, router\u003dNone, route\u003dNone):"},{"line_number":126,"context_line":"        self.dispatcher.dispatch(\u0027remove_router_route\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_83c7d194","line":123,"range":{"start_line":122,"start_character":0,"end_line":123,"end_character":45},"updated":"2016-08-02 01:08:10.000000000","message":"Although other codes looks the same, the indention here seems not right.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def notify_add_router_route(self, router\u003dNone, route\u003dNone):"},{"line_number":121,"context_line":"        self.dispatcher.dispatch(\u0027add_router_route\u0027,"},{"line_number":122,"context_line":"                                 router\u003drouter,"},{"line_number":123,"context_line":"                                 route\u003droute)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def notify_remove_router_route(self, router\u003dNone, route\u003dNone):"},{"line_number":126,"context_line":"        self.dispatcher.dispatch(\u0027remove_router_route\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_acf7def3","line":123,"range":{"start_line":122,"start_character":0,"end_line":123,"end_character":45},"in_reply_to":"bacf61ea_83c7d194","updated":"2016-08-22 13:26:18.000000000","message":"What\u0027s the right indention?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"}],"dragonflow/controller/topology.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c2240648e472210db024384da5d049effd906276","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            if tenant_id \u003d\u003d router.get_topic():"},{"line_number":261,"context_line":"                self.controller.router_deleted(router.get_id())"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":264,"context_line":"        for switch in switches:"},{"line_number":265,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":266,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        sg_groups \u003d self.db_store.get_security_groups()"},{"line_number":269,"context_line":"        for sg_group in sg_groups:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_2311c504","line":266,"range":{"start_line":263,"start_character":0,"end_line":266,"end_character":71},"updated":"2016-08-02 01:08:10.000000000","message":"why moving these code?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            if tenant_id \u003d\u003d router.get_topic():"},{"line_number":261,"context_line":"                self.controller.router_deleted(router.get_id())"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":264,"context_line":"        for switch in switches:"},{"line_number":265,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":266,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        sg_groups \u003d self.db_store.get_security_groups()"},{"line_number":269,"context_line":"        for sg_group in sg_groups:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_ace19e00","line":266,"range":{"start_line":263,"start_character":0,"end_line":266,"end_character":71},"in_reply_to":"bacf61ea_2311c504","updated":"2016-08-22 13:26:18.000000000","message":"I think lswitch should be added firstly.","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            self.controller.floatingip_updated(floating_ip)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def _clear_tenant_topology(self, tenant_id):"},{"line_number":248,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":249,"context_line":"        for switch in switches:"},{"line_number":250,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":251,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        ports \u003d self.db_store.get_ports()"},{"line_number":254,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_29cad2a1","line":251,"range":{"start_line":248,"start_character":0,"end_line":251,"end_character":71},"updated":"2016-08-25 13:46:47.000000000","message":"If this related to this patch, I see the same code at line 268~271","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"de05f638def56a3695e3b7e86ce15851b1c3e13c","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            self.controller.floatingip_updated(floating_ip)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def _clear_tenant_topology(self, tenant_id):"},{"line_number":248,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":249,"context_line":"        for switch in switches:"},{"line_number":250,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":251,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        ports \u003d self.db_store.get_ports()"},{"line_number":254,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_b8e4c63b","line":251,"range":{"start_line":248,"start_character":0,"end_line":251,"end_character":71},"in_reply_to":"1ac06dbe_29cad2a1","updated":"2016-08-26 01:41:34.000000000","message":"line 268~271 should be deleted.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"4b3b8b3800896a40685a72c9163cc632b32d6d71","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            self.controller.floatingip_updated(floating_ip)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def _clear_tenant_topology(self, tenant_id):"},{"line_number":248,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":249,"context_line":"        for switch in switches:"},{"line_number":250,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":251,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        ports \u003d self.db_store.get_ports()"},{"line_number":254,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_d3b5ebd0","line":251,"range":{"start_line":248,"start_character":0,"end_line":251,"end_character":71},"in_reply_to":"fa7ab95a_b8e4c63b","updated":"2016-08-26 02:28:19.000000000","message":"Done","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":249,"context_line":"        for switch in switches:"},{"line_number":250,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":251,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        ports \u003d self.db_store.get_ports()"},{"line_number":254,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_bfea8eaa","line":251,"updated":"2016-09-12 11:21:46.000000000","message":"Why was this change done? What issues did you run into?","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":249,"context_line":"        for switch in switches:"},{"line_number":250,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":251,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        ports \u003d self.db_store.get_ports()"},{"line_number":254,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_d16872bd","line":251,"in_reply_to":"9a89bdaa_bfea8eaa","updated":"2016-09-14 10:53:18.000000000","message":"Should in it\u0027s original position.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"82a6b0dddb3d702ac445339f2f7fcd867fc3b555","unresolved":false,"context_lines":[{"line_number":917,"context_line":"        return self.lrouter.get(\u0027name\u0027)"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"    def get_ports(self):"},{"line_number":920,"context_line":"        res \u003d []"},{"line_number":921,"context_line":"        for port in self.lrouter.get(\u0027ports\u0027, []):"},{"line_number":922,"context_line":"            res.append(LogicalRouterPort(port))"},{"line_number":923,"context_line":"        return res"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def get_topic(self):"},{"line_number":926,"context_line":"        return self.lrouter.get(\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_4f44131a","line":923,"range":{"start_line":920,"start_character":0,"end_line":923,"end_character":18},"updated":"2016-08-01 06:12:58.000000000","message":"But why remove the list comprehension?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"cdf840fda51bb6526e0926de998a3bb4161397a7","unresolved":false,"context_lines":[{"line_number":917,"context_line":"        return self.lrouter.get(\u0027name\u0027)"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"    def get_ports(self):"},{"line_number":920,"context_line":"        res \u003d []"},{"line_number":921,"context_line":"        for port in self.lrouter.get(\u0027ports\u0027, []):"},{"line_number":922,"context_line":"            res.append(LogicalRouterPort(port))"},{"line_number":923,"context_line":"        return res"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def get_topic(self):"},{"line_number":926,"context_line":"        return self.lrouter.get(\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ac06dbe_4cdd8a0d","line":923,"range":{"start_line":920,"start_character":0,"end_line":923,"end_character":18},"in_reply_to":"bacf61ea_4f44131a","updated":"2016-08-22 13:26:18.000000000","message":"Can you explain it in detail?","commit_id":"30458037c37c19b7c71969e6e3aa6ab1df69981d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f4bf47ee3a7d320914d7a5d0e0e4c82db38e196d","unresolved":false,"context_lines":[{"line_number":937,"context_line":"        return self.lrouter.get(\u0027name\u0027)"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    def get_ports(self):"},{"line_number":940,"context_line":"        res \u003d []"},{"line_number":941,"context_line":"        for port in self.lrouter.get(\u0027ports\u0027, []):"},{"line_number":942,"context_line":"            res.append(LogicalRouterPort(port))"},{"line_number":943,"context_line":"        return res"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    def get_topic(self):"},{"line_number":946,"context_line":"        return self.lrouter.get(\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ac06dbe_895026d6","line":943,"range":{"start_line":940,"start_character":0,"end_line":943,"end_character":18},"updated":"2016-08-25 13:46:47.000000000","message":"Is this related to the patch?","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"de05f638def56a3695e3b7e86ce15851b1c3e13c","unresolved":false,"context_lines":[{"line_number":937,"context_line":"        return self.lrouter.get(\u0027name\u0027)"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    def get_ports(self):"},{"line_number":940,"context_line":"        res \u003d []"},{"line_number":941,"context_line":"        for port in self.lrouter.get(\u0027ports\u0027, []):"},{"line_number":942,"context_line":"            res.append(LogicalRouterPort(port))"},{"line_number":943,"context_line":"        return res"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    def get_topic(self):"},{"line_number":946,"context_line":"        return self.lrouter.get(\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa7ab95a_3846f623","line":943,"range":{"start_line":940,"start_character":0,"end_line":943,"end_character":18},"in_reply_to":"1ac06dbe_895026d6","updated":"2016-08-26 01:41:34.000000000","message":"it\u0027s not related with this directly, just a refactor.","commit_id":"b8e22e6cac8100bd3960160cb1094ae6c7211e6a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7ed92e889fd8f7aea81bcd7dfde06f387058bde3","unresolved":false,"context_lines":[{"line_number":939,"context_line":"        res \u003d []"},{"line_number":940,"context_line":"        for port in self.lrouter.get(\u0027ports\u0027, []):"},{"line_number":941,"context_line":"            res.append(LogicalRouterPort(port))"},{"line_number":942,"context_line":"        return res"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def get_topic(self):"},{"line_number":945,"context_line":"        return self.lrouter.get(\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a89bdaa_df267215","line":942,"updated":"2016-09-12 11:21:46.000000000","message":"Why was this change done? How is it better than the old implementation?","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"9aede0973b8ed5b4952d72b8edb4a12b17fb6f09","unresolved":false,"context_lines":[{"line_number":939,"context_line":"        res \u003d []"},{"line_number":940,"context_line":"        for port in self.lrouter.get(\u0027ports\u0027, []):"},{"line_number":941,"context_line":"            res.append(LogicalRouterPort(port))"},{"line_number":942,"context_line":"        return res"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def get_topic(self):"},{"line_number":945,"context_line":"        return self.lrouter.get(\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7a8ec9b2_1621f0fb","line":942,"in_reply_to":"9a89bdaa_df267215","updated":"2016-09-14 10:53:18.000000000","message":"I don\u0027t know why, but code in left side is newer.","commit_id":"146643e7fc6ea2110a6164f2db01dd2a7f08cf28"}],"dragonflow/tests/fullstack/test_l3_flows.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"752b12929c0eee8a4d4338692f8e512674d79801","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def test_router_add_route(self):"},{"line_number":42,"context_line":"        lport \u003d self.port1.port.get_logical_port()"},{"line_number":43,"context_line":"        ip1 \u003d lport.get_ip()"},{"line_number":44,"context_line":"        dest \u003d \"10.{}.{}.0/24\".format(randint(0, 254), randint(0, 254))"},{"line_number":45,"context_line":"        body \u003d {"},{"line_number":46,"context_line":"                    \"routes\": ["},{"line_number":47,"context_line":"                        {"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_47225153","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":71},"updated":"2016-06-24 07:00:30.000000000","message":"254-\u003e255","commit_id":"f9201491f2cd0778a792e3df71f4ffb44dfa27db"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"bccadbe6575c2ad188937a806e267e0278b18087","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def test_router_add_route(self):"},{"line_number":42,"context_line":"        lport \u003d self.port1.port.get_logical_port()"},{"line_number":43,"context_line":"        ip1 \u003d lport.get_ip()"},{"line_number":44,"context_line":"        dest \u003d \"10.{}.{}.0/24\".format(randint(0, 254), randint(0, 254))"},{"line_number":45,"context_line":"        body \u003d {"},{"line_number":46,"context_line":"                    \"routes\": ["},{"line_number":47,"context_line":"                        {"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_7bb5397c","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":71},"in_reply_to":"3aaa91ec_47225153","updated":"2016-06-25 03:38:16.000000000","message":"Typically, I think we should avoid using 255, for it\u0027s a broadcast address.","commit_id":"f9201491f2cd0778a792e3df71f4ffb44dfa27db"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"0acbd5284ccb4ffc551589987f064f00650b0d71","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from dragonflow.tests.fullstack import test_base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class TestL3Flows(test_base.DFTestBase):"},{"line_number":23,"context_line":"    def setUp(self):"},{"line_number":24,"context_line":"        super(TestL3Flows, self).setUp()"},{"line_number":25,"context_line":"        self.topology \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_dc17c452","line":22,"range":{"start_line":22,"start_character":6,"end_line":22,"end_character":17},"updated":"2016-07-18 07:47:58.000000000","message":"In my flesh devstack, the whole test class is failed.\ndragonflow.tests.fullstack.test_l3_flows.TestL3Flows.test_router_add_route: Exception: route flow entry is not installed.\n\nneutronclient.common.exceptions.Conflict: Router interface for subnet 0e2a2138-5624-4c98-b86d-8f4c5422752a on router 8fed30af-82f4-4646-847f-c7386e06f469 cannot be deleted, as it is required by one or more routes.","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"b8cab744786adbc336ff6c7ac4520903d20d543f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from dragonflow.tests.fullstack import test_base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class TestL3Flows(test_base.DFTestBase):"},{"line_number":23,"context_line":"    def setUp(self):"},{"line_number":24,"context_line":"        super(TestL3Flows, self).setUp()"},{"line_number":25,"context_line":"        self.topology \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_c6a058a2","line":22,"range":{"start_line":22,"start_character":6,"end_line":22,"end_character":17},"in_reply_to":"dada55a8_dc17c452","updated":"2016-07-19 07:20:26.000000000","message":"I will try to reproduce it.","commit_id":"32f8065f775e24fa6f5aa773f916f388fed67921"}]}
