)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"18069ec98d713f982f7d04d07ba92cf981fcd6ba","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is the implementation of allowed address pairs blueprint, and"},{"line_number":10,"context_line":"it only support using active detection method for now."},{"line_number":11,"context_line":"The main change are:"},{"line_number":12,"context_line":"1) Add a struct named \u0027activenode\u0027 in DF DB, and it used to save the detected"},{"line_number":13,"context_line":"active VM port of a allowed address pairs."},{"line_number":14,"context_line":"2) Add a app named allowed_address_pairs_app. This app used to detect the"},{"line_number":15,"context_line":"active VM port by sending ARP requests and receiving the replies or the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1aa78d24_e1173b52","line":12,"range":{"start_line":12,"start_character":23,"end_line":12,"end_character":33},"updated":"2016-07-11 01:46:27.000000000","message":"activeports? Suggest you add this table to neutron DB, because the eventual consistency will cause delay of detection, which is not allowed for port communication. On other hand, you can also save it in DF DB and notify the changes via PUB/SUB.","commit_id":"757eea8b463189279fa5faa37b6fbba128740303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implement the active detection app for allowed"},{"line_number":10,"context_line":"address pairs."},{"line_number":11,"context_line":"The main change are:"},{"line_number":12,"context_line":"1) Add a struct named \u0027activeport\u0027 in DF DB, and it used to save the detected"},{"line_number":13,"context_line":"active VM port of a allowed address pairs."},{"line_number":14,"context_line":"2) Add a app named active_port_detection_app. This app used to detect the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1ac06dbe_5c11385c","line":11,"range":{"start_line":11,"start_character":9,"end_line":11,"end_character":15},"updated":"2016-08-25 01:41:11.000000000","message":"changes","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"b3d9a9ba5d66a576515e172570faa60ce77c2e6c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implement the active detection app for allowed"},{"line_number":10,"context_line":"address pairs."},{"line_number":11,"context_line":"The main change are:"},{"line_number":12,"context_line":"1) Add a struct named \u0027activeport\u0027 in DF DB, and it used to save the detected"},{"line_number":13,"context_line":"active VM port of a allowed address pairs."},{"line_number":14,"context_line":"2) Add a app named active_port_detection_app. This app used to detect the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a89bdaa_a2946a37","line":11,"range":{"start_line":11,"start_character":9,"end_line":11,"end_character":15},"in_reply_to":"1ac06dbe_5c11385c","updated":"2016-09-05 13:28:47.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch implement the active detection app for allowed"},{"line_number":10,"context_line":"address pairs."},{"line_number":11,"context_line":"The main change are:"},{"line_number":12,"context_line":"1) Add a struct named \u0027activeport\u0027 in DF DB, and it used to save the detected"},{"line_number":13,"context_line":"active VM port of a allowed address pairs."},{"line_number":14,"context_line":"2) Add a app named active_port_detection_app. This app used to detect the"},{"line_number":15,"context_line":"active VM port by sending ARP requests and receiving the replies or the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1ac06dbe_3c143c4b","line":12,"range":{"start_line":12,"start_character":52,"end_line":12,"end_character":56},"updated":"2016-08-25 01:41:11.000000000","message":"is used","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"b3d9a9ba5d66a576515e172570faa60ce77c2e6c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch implement the active detection app for allowed"},{"line_number":10,"context_line":"address pairs."},{"line_number":11,"context_line":"The main change are:"},{"line_number":12,"context_line":"1) Add a struct named \u0027activeport\u0027 in DF DB, and it used to save the detected"},{"line_number":13,"context_line":"active VM port of a allowed address pairs."},{"line_number":14,"context_line":"2) Add a app named active_port_detection_app. This app used to detect the"},{"line_number":15,"context_line":"active VM port by sending ARP requests and receiving the replies or the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a89bdaa_c2996e70","line":12,"range":{"start_line":12,"start_character":52,"end_line":12,"end_character":56},"in_reply_to":"1ac06dbe_3c143c4b","updated":"2016-09-05 13:28:47.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":11,"context_line":"The main change are:"},{"line_number":12,"context_line":"1) Add a struct named \u0027activeport\u0027 in DF DB, and it used to save the detected"},{"line_number":13,"context_line":"active VM port of a allowed address pairs."},{"line_number":14,"context_line":"2) Add a app named active_port_detection_app. This app used to detect the"},{"line_number":15,"context_line":"active VM port by sending ARP requests and receiving the replies or the"},{"line_number":16,"context_line":"gratuitous ARPs."},{"line_number":17,"context_line":"3) Add fullstack cases about this feature."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1ac06dbe_9c0f3036","line":14,"range":{"start_line":14,"start_character":55,"end_line":14,"end_character":59},"updated":"2016-08-25 01:41:11.000000000","message":"is used","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"b3d9a9ba5d66a576515e172570faa60ce77c2e6c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"The main change are:"},{"line_number":12,"context_line":"1) Add a struct named \u0027activeport\u0027 in DF DB, and it used to save the detected"},{"line_number":13,"context_line":"active VM port of a allowed address pairs."},{"line_number":14,"context_line":"2) Add a app named active_port_detection_app. This app used to detect the"},{"line_number":15,"context_line":"active VM port by sending ARP requests and receiving the replies or the"},{"line_number":16,"context_line":"gratuitous ARPs."},{"line_number":17,"context_line":"3) Add fullstack cases about this feature."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a89bdaa_e29e7255","line":14,"range":{"start_line":14,"start_character":55,"end_line":14,"end_character":59},"in_reply_to":"1ac06dbe_9c0f3036","updated":"2016-09-05 13:28:47.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"}],"dragonflow/cli/df_db.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"373fdd815a6084e5163dda758ddff2339c6dd2c9","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"db_tables \u003d [\u0027lport\u0027, \u0027lswitch\u0027, \u0027lrouter\u0027, \u0027chassis\u0027, \u0027secgroup\u0027,"},{"line_number":27,"context_line":"             \u0027unique_key\u0027, \u0027floatingip\u0027, \u0027publisher\u0027, \u0027qospolicy\u0027,"},{"line_number":28,"context_line":"             \u0027portstats\u0027, \u0027activeport\u0027]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def print_tables():"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a74a57a_5d3ff324","line":28,"range":{"start_line":28,"start_character":27,"end_line":28,"end_character":37},"updated":"2016-12-01 16:12:32.000000000","message":"Perhaps make this table name a constant?","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"c4681e5a1239c42fed8948d7fe693fa5cbbb971f","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"db_tables \u003d [\u0027lport\u0027, \u0027lswitch\u0027, \u0027lrouter\u0027, \u0027chassis\u0027, \u0027secgroup\u0027,"},{"line_number":27,"context_line":"             \u0027unique_key\u0027, \u0027floatingip\u0027, \u0027publisher\u0027, \u0027qospolicy\u0027,"},{"line_number":28,"context_line":"             \u0027portstats\u0027, \u0027activeport\u0027]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def print_tables():"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_0ddd5b70","line":28,"range":{"start_line":28,"start_character":27,"end_line":28,"end_character":37},"in_reply_to":"5a74a57a_5d3ff324","updated":"2016-12-08 10:04:11.000000000","message":"Done","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"}],"dragonflow/common/common_params.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                default\u003dTrue,"},{"line_number":138,"context_line":"                help\u003d_(\u0027When enabled, packets to the address in allowed \u0027"},{"line_number":139,"context_line":"                       \u0027address pairs will be only sent to the VM ports \u0027"},{"line_number":140,"context_line":"                       \u0027which is be detected active for this address. \u0027"},{"line_number":141,"context_line":"                       \u0027Otherwise, those packets will be broadcast to all \u0027"},{"line_number":142,"context_line":"                       \u0027VM ports with this address in allowed address \u0027"},{"line_number":143,"context_line":"                       \u0027pairs.\u0027))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_1a59768e","line":140,"range":{"start_line":140,"start_character":29,"end_line":140,"end_character":36},"updated":"2016-08-25 01:41:11.000000000","message":"typo","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                default\u003dTrue,"},{"line_number":138,"context_line":"                help\u003d_(\u0027When enabled, packets to the address in allowed \u0027"},{"line_number":139,"context_line":"                       \u0027address pairs will be only sent to the VM ports \u0027"},{"line_number":140,"context_line":"                       \u0027which is be detected active for this address. \u0027"},{"line_number":141,"context_line":"                       \u0027Otherwise, those packets will be broadcast to all \u0027"},{"line_number":142,"context_line":"                       \u0027VM ports with this address in allowed address \u0027"},{"line_number":143,"context_line":"                       \u0027pairs.\u0027))"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_d704f7c7","line":140,"range":{"start_line":140,"start_character":29,"end_line":140,"end_character":36},"in_reply_to":"1ac06dbe_1a59768e","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"}],"dragonflow/controller/active_port_detection_app.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation.\r"},{"line_number":2,"context_line":"# All Rights Reserved.\r"},{"line_number":3,"context_line":"#\r"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_4b1f0bb7","line":1,"range":{"start_line":1,"start_character":19,"end_line":1,"end_character":20},"updated":"2016-08-24 03:44:24.000000000","message":"*6?","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation.\r"},{"line_number":2,"context_line":"# All Rights Reserved.\r"},{"line_number":3,"context_line":"#\r"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_b71a136d","line":1,"range":{"start_line":1,"start_character":19,"end_line":1,"end_character":20},"in_reply_to":"1ac06dbe_4b1f0bb7","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\r"},{"line_number":16,"context_line":"import netaddr\r"},{"line_number":17,"context_line":"\r"},{"line_number":18,"context_line":"from dragonflow._i18n import _LE, _LI\r"},{"line_number":19,"context_line":"from dragonflow.controller.common import constants as controller_const\r"},{"line_number":20,"context_line":"from dragonflow.controller.common import utils\r"},{"line_number":21,"context_line":"from dragonflow.controller.df_base_app import DFlowApp\r"},{"line_number":22,"context_line":"from dragonflow.db import api_nb\r"},{"line_number":23,"context_line":"from oslo_config import cfg\r"},{"line_number":24,"context_line":"from oslo_log import log\r"},{"line_number":25,"context_line":"from oslo_service import loopingcall\r"},{"line_number":26,"context_line":"from ryu.lib.packet import arp\r"},{"line_number":27,"context_line":"from ryu.lib.packet import packet\r"},{"line_number":28,"context_line":"from ryu.ofproto import ether\r"},{"line_number":29,"context_line":"\r"},{"line_number":30,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":31,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_2559bc8e","line":28,"range":{"start_line":18,"start_character":0,"end_line":28,"end_character":29},"updated":"2016-08-25 01:41:11.000000000","message":"import order, pls refer to http://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\r"},{"line_number":16,"context_line":"import netaddr\r"},{"line_number":17,"context_line":"\r"},{"line_number":18,"context_line":"from dragonflow._i18n import _LE, _LI\r"},{"line_number":19,"context_line":"from dragonflow.controller.common import constants as controller_const\r"},{"line_number":20,"context_line":"from dragonflow.controller.common import utils\r"},{"line_number":21,"context_line":"from dragonflow.controller.df_base_app import DFlowApp\r"},{"line_number":22,"context_line":"from dragonflow.db import api_nb\r"},{"line_number":23,"context_line":"from oslo_config import cfg\r"},{"line_number":24,"context_line":"from oslo_log import log\r"},{"line_number":25,"context_line":"from oslo_service import loopingcall\r"},{"line_number":26,"context_line":"from ryu.lib.packet import arp\r"},{"line_number":27,"context_line":"from ryu.lib.packet import packet\r"},{"line_number":28,"context_line":"from ryu.ofproto import ether\r"},{"line_number":29,"context_line":"\r"},{"line_number":30,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":31,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_372523ab","line":28,"range":{"start_line":18,"start_character":0,"end_line":28,"end_character":29},"in_reply_to":"1ac06dbe_2559bc8e","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":29,"context_line":"\r"},{"line_number":30,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"class ActivePortDetectionApp(DFlowApp):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_ba794295","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":24},"updated":"2016-08-25 01:41:11.000000000","message":"we can make it an opt and allow users to set the interval","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":29,"context_line":"\r"},{"line_number":30,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"class ActivePortDetectionApp(DFlowApp):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_5c1b8372","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":24},"in_reply_to":"1ac06dbe_ba794295","updated":"2016-09-05 13:26:50.000000000","message":"OK, but I think this is not emergency, I will add this in a later patch.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"class ActivePortDetectionApp(DFlowApp):\r"},{"line_number":36,"context_line":"\r"},{"line_number":37,"context_line":"    def __init__(self, *args, **kwargs):\r"},{"line_number":38,"context_line":"        super(ActivePortDetectionApp, self).__init__(*args,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_d44fc631","line":35,"range":{"start_line":35,"start_character":6,"end_line":35,"end_character":28},"updated":"2016-08-24 03:44:24.000000000","message":"I think it will be great to add docstring to this app. For example, the purpose of this app and in which case this app should be enabled.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":32,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"class ActivePortDetectionApp(DFlowApp):\r"},{"line_number":36,"context_line":"\r"},{"line_number":37,"context_line":"    def __init__(self, *args, **kwargs):\r"},{"line_number":38,"context_line":"        super(ActivePortDetectionApp, self).__init__(*args,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_f7791f94","line":35,"range":{"start_line":35,"start_character":6,"end_line":35,"end_character":28},"in_reply_to":"1ac06dbe_d44fc631","updated":"2016-08-25 01:41:11.000000000","message":"+1","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":32,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"class ActivePortDetectionApp(DFlowApp):\r"},{"line_number":36,"context_line":"\r"},{"line_number":37,"context_line":"    def __init__(self, *args, **kwargs):\r"},{"line_number":38,"context_line":"        super(ActivePortDetectionApp, self).__init__(*args,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_7c2687bb","line":35,"range":{"start_line":35,"start_character":6,"end_line":35,"end_character":28},"in_reply_to":"1ac06dbe_d44fc631","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":32,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"class ActivePortDetectionApp(DFlowApp):\r"},{"line_number":36,"context_line":"\r"},{"line_number":37,"context_line":"    def __init__(self, *args, **kwargs):\r"},{"line_number":38,"context_line":"        super(ActivePortDetectionApp, self).__init__(*args,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_bc200f9d","line":35,"range":{"start_line":35,"start_character":6,"end_line":35,"end_character":28},"in_reply_to":"1ac06dbe_f7791f94","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.allowed_address_pairs_refs_list \u003d {}\r"},{"line_number":41,"context_line":"        self.api.register_table_handler(controller_const.ARP_TABLE,\r"},{"line_number":42,"context_line":"                                        self.packet_in_handler)\r"},{"line_number":43,"context_line":"        self.use_active_detection_for_allowed_address_pairs \u003d \\\r"},{"line_number":44,"context_line":"            cfg.CONF.df.use_active_detection_for_allowed_address_pairs\r"},{"line_number":45,"context_line":"\r"},{"line_number":46,"context_line":"    def packet_in_handler(self, event):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_535ad0f2","line":43,"range":{"start_line":43,"start_character":13,"end_line":43,"end_character":59},"updated":"2016-08-24 03:44:24.000000000","message":"This configuration seems to bypass the functionality in this app. But since this app is enabled by user, they may just want to use the functionality. Or else, user don\u0027t need to add this app to app list. So, I think it is redundant here. What do you think?","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.allowed_address_pairs_refs_list \u003d {}\r"},{"line_number":41,"context_line":"        self.api.register_table_handler(controller_const.ARP_TABLE,\r"},{"line_number":42,"context_line":"                                        self.packet_in_handler)\r"},{"line_number":43,"context_line":"        self.use_active_detection_for_allowed_address_pairs \u003d \\\r"},{"line_number":44,"context_line":"            cfg.CONF.df.use_active_detection_for_allowed_address_pairs\r"},{"line_number":45,"context_line":"\r"},{"line_number":46,"context_line":"    def packet_in_handler(self, event):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_e5c96427","line":43,"range":{"start_line":43,"start_character":13,"end_line":43,"end_character":59},"in_reply_to":"1ac06dbe_535ad0f2","updated":"2016-08-25 01:41:11.000000000","message":"+1","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.allowed_address_pairs_refs_list \u003d {}\r"},{"line_number":41,"context_line":"        self.api.register_table_handler(controller_const.ARP_TABLE,\r"},{"line_number":42,"context_line":"                                        self.packet_in_handler)\r"},{"line_number":43,"context_line":"        self.use_active_detection_for_allowed_address_pairs \u003d \\\r"},{"line_number":44,"context_line":"            cfg.CONF.df.use_active_detection_for_allowed_address_pairs\r"},{"line_number":45,"context_line":"\r"},{"line_number":46,"context_line":"    def packet_in_handler(self, event):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_e71124ae","line":43,"range":{"start_line":43,"start_character":13,"end_line":43,"end_character":59},"in_reply_to":"1ac06dbe_535ad0f2","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.allowed_address_pairs_refs_list \u003d {}\r"},{"line_number":41,"context_line":"        self.api.register_table_handler(controller_const.ARP_TABLE,\r"},{"line_number":42,"context_line":"                                        self.packet_in_handler)\r"},{"line_number":43,"context_line":"        self.use_active_detection_for_allowed_address_pairs \u003d \\\r"},{"line_number":44,"context_line":"            cfg.CONF.df.use_active_detection_for_allowed_address_pairs\r"},{"line_number":45,"context_line":"\r"},{"line_number":46,"context_line":"    def packet_in_handler(self, event):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_a77e3ce2","line":43,"range":{"start_line":43,"start_character":13,"end_line":43,"end_character":59},"in_reply_to":"1ac06dbe_e5c96427","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            LOG.error(_LE(\"No support for non ARP protocol\"))\r"},{"line_number":52,"context_line":"            return\r"},{"line_number":53,"context_line":"\r"},{"line_number":54,"context_line":"        if (((arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST) and\r"},{"line_number":55,"context_line":"                (arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip)) or\r"},{"line_number":56,"context_line":"                (arp_pkt.opcode \u003d\u003d arp.ARP_REPLY)):\r"},{"line_number":57,"context_line":"            match \u003d msg.match\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_d499867a","line":54,"range":{"start_line":54,"start_character":13,"end_line":54,"end_character":48},"updated":"2016-08-24 03:44:24.000000000","message":"nit: this parenthesis is not required","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            LOG.error(_LE(\"No support for non ARP protocol\"))\r"},{"line_number":52,"context_line":"            return\r"},{"line_number":53,"context_line":"\r"},{"line_number":54,"context_line":"        if (((arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST) and\r"},{"line_number":55,"context_line":"                (arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip)) or\r"},{"line_number":56,"context_line":"                (arp_pkt.opcode \u003d\u003d arp.ARP_REPLY)):\r"},{"line_number":57,"context_line":"            match \u003d msg.match\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_f7781b92","line":54,"range":{"start_line":54,"start_character":13,"end_line":54,"end_character":48},"in_reply_to":"1ac06dbe_d499867a","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            if ofport \u003d\u003d lport.get_external_value(\u0027ofport\u0027):\r"},{"line_number":167,"context_line":"                found_lport \u003d lport\r"},{"line_number":168,"context_line":"                break\r"},{"line_number":169,"context_line":"        if found_lport is None:\r"},{"line_number":170,"context_line":"            return\r"},{"line_number":171,"context_line":"\r"},{"line_number":172,"context_line":"        network_id \u003d found_lport.get_lswitch_id()\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_401e660c","line":169,"range":{"start_line":169,"start_character":8,"end_line":169,"end_character":31},"updated":"2016-08-25 01:41:11.000000000","message":"use \u0027else\u0027 instead","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            if ofport \u003d\u003d lport.get_external_value(\u0027ofport\u0027):\r"},{"line_number":167,"context_line":"                found_lport \u003d lport\r"},{"line_number":168,"context_line":"                break\r"},{"line_number":169,"context_line":"        if found_lport is None:\r"},{"line_number":170,"context_line":"            return\r"},{"line_number":171,"context_line":"\r"},{"line_number":172,"context_line":"        network_id \u003d found_lport.get_lswitch_id()\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_97b98f31","line":169,"range":{"start_line":169,"start_character":8,"end_line":169,"end_character":31},"in_reply_to":"1ac06dbe_401e660c","updated":"2016-09-05 13:26:50.000000000","message":"That will be a long segment to be indent if using \u0027else\u0027, so calling \u0027return\u0027 here may make codes more clear.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        if old_active_port !\u003d active_port:\r"},{"line_number":184,"context_line":"            LOG.info(_LI(\"Detected new active node. ip\u003d%(ip)s, \"\r"},{"line_number":185,"context_line":"                         \"mac\u003d%(mac)s, lport_id\u003d%(lport_id)s\")\r"},{"line_number":186,"context_line":"                     % {\u0027ip\u0027: ip, \u0027mac\u0027: mac,\r"},{"line_number":187,"context_line":"                        \u0027lport_id\u0027: active_port.get_detected_lport_id()})\r"},{"line_number":188,"context_line":"            self.nb_api.update_active_port(\r"},{"line_number":189,"context_line":"                id\u003dkey,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_6b512736","line":186,"range":{"start_line":186,"start_character":21,"end_line":186,"end_character":23},"updated":"2016-08-24 03:44:24.000000000","message":"The string format is not needed here, LOG will do the string format. You can just use like this:\nLOG.info(_LI(\"mac\u003d%(mac)s, lport_id\u003d%(lport_id)s\"), {\u0027mac\u0027: mac,\u0027lport_id\u0027: active_port.get_detected_lport_id()})","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        if old_active_port !\u003d active_port:\r"},{"line_number":184,"context_line":"            LOG.info(_LI(\"Detected new active node. ip\u003d%(ip)s, \"\r"},{"line_number":185,"context_line":"                         \"mac\u003d%(mac)s, lport_id\u003d%(lport_id)s\")\r"},{"line_number":186,"context_line":"                     % {\u0027ip\u0027: ip, \u0027mac\u0027: mac,\r"},{"line_number":187,"context_line":"                        \u0027lport_id\u0027: active_port.get_detected_lport_id()})\r"},{"line_number":188,"context_line":"            self.nb_api.update_active_port(\r"},{"line_number":189,"context_line":"                id\u003dkey,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_57962795","line":186,"range":{"start_line":186,"start_character":21,"end_line":186,"end_character":23},"in_reply_to":"1ac06dbe_6b512736","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        key \u003d network_id + ip\r"},{"line_number":198,"context_line":"        old_active_port \u003d self.db_store.get_active_port(key)\r"},{"line_number":199,"context_line":"        if old_active_port and \\\r"},{"line_number":200,"context_line":"                (old_active_port.get_detected_lport_id() \u003d\u003d lport.get_id()):\r"},{"line_number":201,"context_line":"            self.nb_api.delete_active_port(key, lport.get_topic())\r"},{"line_number":202,"context_line":"\r"},{"line_number":203,"context_line":"    def _add_target_ip(self, ip, lport):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_8b1aa37b","line":200,"range":{"start_line":200,"start_character":16,"end_line":200,"end_character":17},"updated":"2016-08-24 03:44:24.000000000","message":"Why not just use parenthesis to the whole if sentence?","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        key \u003d network_id + ip\r"},{"line_number":198,"context_line":"        old_active_port \u003d self.db_store.get_active_port(key)\r"},{"line_number":199,"context_line":"        if old_active_port and \\\r"},{"line_number":200,"context_line":"                (old_active_port.get_detected_lport_id() \u003d\u003d lport.get_id()):\r"},{"line_number":201,"context_line":"            self.nb_api.delete_active_port(key, lport.get_topic())\r"},{"line_number":202,"context_line":"\r"},{"line_number":203,"context_line":"    def _add_target_ip(self, ip, lport):\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_97beeffd","line":200,"range":{"start_line":200,"start_character":16,"end_line":200,"end_character":17},"in_reply_to":"1ac06dbe_8b1aa37b","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"},{"line_number":307,"context_line":"        original_ips \u003d self._get_ips_in_allowed_address_pairs(original_lport)\r"},{"line_number":308,"context_line":"\r"},{"line_number":309,"context_line":"        for target_ip in ips:\r"},{"line_number":310,"context_line":"            if target_ip not in original_ips:\r"},{"line_number":311,"context_line":"                self._add_target_ip(target_ip, lport)\r"},{"line_number":312,"context_line":"\r"},{"line_number":313,"context_line":"        for target_ip in original_ips:\r"},{"line_number":314,"context_line":"            if target_ip not in ips:\r"},{"line_number":315,"context_line":"                self._remove_target_ip(target_ip, original_lport)\r"},{"line_number":316,"context_line":"\r"},{"line_number":317,"context_line":"    def remove_local_port(self, lport):\r"},{"line_number":318,"context_line":"        if not self.use_active_detection_for_allowed_address_pairs:\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_14315e5a","line":315,"range":{"start_line":309,"start_character":0,"end_line":315,"end_character":65},"updated":"2016-08-24 03:44:24.000000000","message":"nit: This is not functional. I think you could use set here, so you don\u0027t have to do the check at line 68 (ip not in ips). And you can compose code like this:\n\nfor ip in ips - original_ips:\n    self._add_target_ip(ip, lport)\n\nfor ip in original_ips - ips:\n    self._add_target_ip(ip, lport)","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"},{"line_number":307,"context_line":"        original_ips \u003d self._get_ips_in_allowed_address_pairs(original_lport)\r"},{"line_number":308,"context_line":"\r"},{"line_number":309,"context_line":"        for target_ip in ips:\r"},{"line_number":310,"context_line":"            if target_ip not in original_ips:\r"},{"line_number":311,"context_line":"                self._add_target_ip(target_ip, lport)\r"},{"line_number":312,"context_line":"\r"},{"line_number":313,"context_line":"        for target_ip in original_ips:\r"},{"line_number":314,"context_line":"            if target_ip not in ips:\r"},{"line_number":315,"context_line":"                self._remove_target_ip(target_ip, original_lport)\r"},{"line_number":316,"context_line":"\r"},{"line_number":317,"context_line":"    def remove_local_port(self, lport):\r"},{"line_number":318,"context_line":"        if not self.use_active_detection_for_allowed_address_pairs:\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_5772a77d","line":315,"range":{"start_line":309,"start_character":0,"end_line":315,"end_character":65},"in_reply_to":"1ac06dbe_14315e5a","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            return\r"},{"line_number":326,"context_line":"\r"},{"line_number":327,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"},{"line_number":328,"context_line":"        if len(ips) \u003d\u003d 0:\r"},{"line_number":329,"context_line":"            return\r"},{"line_number":330,"context_line":"\r"},{"line_number":331,"context_line":"        for target_ip in ips:\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_1495de31","line":328,"range":{"start_line":328,"start_character":8,"end_line":328,"end_character":25},"updated":"2016-08-24 03:44:24.000000000","message":"nit: you could just use \"if not ips:\"","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            return\r"},{"line_number":326,"context_line":"\r"},{"line_number":327,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"},{"line_number":328,"context_line":"        if len(ips) \u003d\u003d 0:\r"},{"line_number":329,"context_line":"            return\r"},{"line_number":330,"context_line":"\r"},{"line_number":331,"context_line":"        for target_ip in ips:\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_976c2f9e","line":328,"range":{"start_line":328,"start_character":8,"end_line":328,"end_character":25},"in_reply_to":"1ac06dbe_1495de31","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":36,"context_line":"\r"},{"line_number":37,"context_line":"    \"\"\"A application for detecting the active port for allowed address pairs\r"},{"line_number":38,"context_line":"\r"},{"line_number":39,"context_line":"    When this application are loaded, packets to the address in a allowed\r"},{"line_number":40,"context_line":"    address pair will be only sent to the VM port which has been detected\r"},{"line_number":41,"context_line":"    active for this address. Otherwise, those packets will be broadcast to\r"},{"line_number":42,"context_line":"    all VM ports with this address in the allowed address pair.\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_28a17df8","line":39,"range":{"start_line":39,"start_character":26,"end_line":39,"end_character":29},"updated":"2016-09-08 09:33:24.000000000","message":"nit: s/are/is/g","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":36,"context_line":"\r"},{"line_number":37,"context_line":"    \"\"\"A application for detecting the active port for allowed address pairs\r"},{"line_number":38,"context_line":"\r"},{"line_number":39,"context_line":"    When this application are loaded, packets to the address in a allowed\r"},{"line_number":40,"context_line":"    address pair will be only sent to the VM port which has been detected\r"},{"line_number":41,"context_line":"    active for this address. Otherwise, those packets will be broadcast to\r"},{"line_number":42,"context_line":"    all VM ports with this address in the allowed address pair.\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_890c0c44","line":39,"range":{"start_line":39,"start_character":26,"end_line":39,"end_character":29},"in_reply_to":"9a89bdaa_28a17df8","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip) or \\\r"},{"line_number":62,"context_line":"                arp_pkt.opcode \u003d\u003d arp.ARP_REPLY:\r"},{"line_number":63,"context_line":"            match \u003d msg.match\r"},{"line_number":64,"context_line":"            in_port \u003d match.get(\u0027in_port\u0027, 0)\r"},{"line_number":65,"context_line":"            self._update_active_port_in_db(\r"},{"line_number":66,"context_line":"                arp_pkt.src_ip, arp_pkt.src_mac, in_port)\r"},{"line_number":67,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_7370d6a4","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":45},"updated":"2016-09-08 09:33:24.000000000","message":"If the in_port is not found, and in_port will be 0, will the active port be updated in db? Or it will just return at line 175?\n\nIf so, why not just return instead of calling _update_active_port_in_db?","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip) or \\\r"},{"line_number":62,"context_line":"                arp_pkt.opcode \u003d\u003d arp.ARP_REPLY:\r"},{"line_number":63,"context_line":"            match \u003d msg.match\r"},{"line_number":64,"context_line":"            in_port \u003d match.get(\u0027in_port\u0027, 0)\r"},{"line_number":65,"context_line":"            self._update_active_port_in_db(\r"},{"line_number":66,"context_line":"                arp_pkt.src_ip, arp_pkt.src_mac, in_port)\r"},{"line_number":67,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_ccb9c230","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":45},"in_reply_to":"9a89bdaa_7370d6a4","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    def _get_ips_in_allowed_address_pairs(self, lport):\r"},{"line_number":69,"context_line":"        ips \u003d []\r"},{"line_number":70,"context_line":"        allowed_address_pairs \u003d lport.get_allowed_address_pairs()\r"},{"line_number":71,"context_line":"        if allowed_address_pairs is not None:\r"},{"line_number":72,"context_line":"            for pair in allowed_address_pairs:\r"},{"line_number":73,"context_line":"                ip \u003d pair[\"ip_address\"]\r"},{"line_number":74,"context_line":"                if (netaddr.IPNetwork(ip).version \u003d\u003d 4) and (ip not in ips):\r"},{"line_number":75,"context_line":"                    # IPv6 addresses are not supported yet\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_d35442cb","line":72,"range":{"start_line":71,"start_character":0,"end_line":72,"end_character":46},"updated":"2016-09-08 09:33:24.000000000","message":"you could just call \n\nfor pair in allowed_address_pairs:\n\nsince allowed_address_pairs will default be []\n\nhttps://github.com/openstack/dragonflow/blob/515f9caecf469b70f59f06226ca488f3c2c33e06/dragonflow/db/api_nb.py#L894","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    def _get_ips_in_allowed_address_pairs(self, lport):\r"},{"line_number":69,"context_line":"        ips \u003d []\r"},{"line_number":70,"context_line":"        allowed_address_pairs \u003d lport.get_allowed_address_pairs()\r"},{"line_number":71,"context_line":"        if allowed_address_pairs is not None:\r"},{"line_number":72,"context_line":"            for pair in allowed_address_pairs:\r"},{"line_number":73,"context_line":"                ip \u003d pair[\"ip_address\"]\r"},{"line_number":74,"context_line":"                if (netaddr.IPNetwork(ip).version \u003d\u003d 4) and (ip not in ips):\r"},{"line_number":75,"context_line":"                    # IPv6 addresses are not supported yet\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_ece4be3c","line":72,"range":{"start_line":71,"start_character":0,"end_line":72,"end_character":46},"in_reply_to":"9a89bdaa_d35442cb","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if allowed_address_pairs is not None:\r"},{"line_number":72,"context_line":"            for pair in allowed_address_pairs:\r"},{"line_number":73,"context_line":"                ip \u003d pair[\"ip_address\"]\r"},{"line_number":74,"context_line":"                if (netaddr.IPNetwork(ip).version \u003d\u003d 4) and (ip not in ips):\r"},{"line_number":75,"context_line":"                    # IPv6 addresses are not supported yet\r"},{"line_number":76,"context_line":"                    ips.append(ip)\r"},{"line_number":77,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_f3bea6ac","line":74,"range":{"start_line":74,"start_character":60,"end_line":74,"end_character":76},"updated":"2016-09-08 09:33:24.000000000","message":"If it is a list which don\u0027t allow to have duplicated elements, it\u0027s nature should be a set. So try to use set for ips, and you don\u0027t need to check the existence.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if allowed_address_pairs is not None:\r"},{"line_number":72,"context_line":"            for pair in allowed_address_pairs:\r"},{"line_number":73,"context_line":"                ip \u003d pair[\"ip_address\"]\r"},{"line_number":74,"context_line":"                if (netaddr.IPNetwork(ip).version \u003d\u003d 4) and (ip not in ips):\r"},{"line_number":75,"context_line":"                    # IPv6 addresses are not supported yet\r"},{"line_number":76,"context_line":"                    ips.append(ip)\r"},{"line_number":77,"context_line":"\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_a751ef64","line":74,"range":{"start_line":74,"start_character":60,"end_line":74,"end_character":76},"in_reply_to":"9a89bdaa_f3bea6ac","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            for pair in allowed_address_pairs:\r"},{"line_number":73,"context_line":"                ip \u003d pair[\"ip_address\"]\r"},{"line_number":74,"context_line":"                if (netaddr.IPNetwork(ip).version \u003d\u003d 4) and (ip not in ips):\r"},{"line_number":75,"context_line":"                    # IPv6 addresses are not supported yet\r"},{"line_number":76,"context_line":"                    ips.append(ip)\r"},{"line_number":77,"context_line":"\r"},{"line_number":78,"context_line":"        return ips\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_f3fdc6b1","line":75,"range":{"start_line":75,"start_character":20,"end_line":75,"end_character":58},"updated":"2016-09-08 09:33:24.000000000","message":"I think it is good to at least print a (debug)log for ipv6 addresses.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            for pair in allowed_address_pairs:\r"},{"line_number":73,"context_line":"                ip \u003d pair[\"ip_address\"]\r"},{"line_number":74,"context_line":"                if (netaddr.IPNetwork(ip).version \u003d\u003d 4) and (ip not in ips):\r"},{"line_number":75,"context_line":"                    # IPv6 addresses are not supported yet\r"},{"line_number":76,"context_line":"                    ips.append(ip)\r"},{"line_number":77,"context_line":"\r"},{"line_number":78,"context_line":"        return ips\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_4209f92b","line":75,"range":{"start_line":75,"start_character":20,"end_line":75,"end_character":58},"in_reply_to":"9a89bdaa_f3fdc6b1","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"c759b73bce1aca1861e9493095c0a01d04052d22","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                found_lport \u003d lport\r"},{"line_number":174,"context_line":"                break\r"},{"line_number":175,"context_line":"        if found_lport is None:\r"},{"line_number":176,"context_line":"            return\r"},{"line_number":177,"context_line":"\r"},{"line_number":178,"context_line":"        network_id \u003d found_lport.get_lswitch_id()\r"},{"line_number":179,"context_line":"        topic \u003d found_lport.get_topic()\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_720fb92e","line":176,"range":{"start_line":176,"start_character":10,"end_line":176,"end_character":18},"updated":"2016-09-09 06:20:05.000000000","message":"maybe a log here is better","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                found_lport \u003d lport\r"},{"line_number":174,"context_line":"                break\r"},{"line_number":175,"context_line":"        if found_lport is None:\r"},{"line_number":176,"context_line":"            return\r"},{"line_number":177,"context_line":"\r"},{"line_number":178,"context_line":"        network_id \u003d found_lport.get_lswitch_id()\r"},{"line_number":179,"context_line":"        topic \u003d found_lport.get_topic()\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_025e11e9","line":176,"range":{"start_line":176,"start_character":10,"end_line":176,"end_character":18},"in_reply_to":"9a89bdaa_720fb92e","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"c759b73bce1aca1861e9493095c0a01d04052d22","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        ip_refs_list \u003d self.allowed_address_pairs_refs_list.get(key)\r"},{"line_number":219,"context_line":"        lport_id \u003d lport.get_id()\r"},{"line_number":220,"context_line":"        if ip_refs_list is not None:\r"},{"line_number":221,"context_line":"            if lport_id not in ip_refs_list:\r"},{"line_number":222,"context_line":"                # add this ip to refs list\r"},{"line_number":223,"context_line":"                ip_refs_list.append(lport_id)\r"},{"line_number":224,"context_line":"        else:\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_92bd1d05","line":221,"range":{"start_line":221,"start_character":12,"end_line":221,"end_character":44},"updated":"2016-09-09 06:20:05.000000000","message":"else condition no need process ?","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        ip_refs_list \u003d self.allowed_address_pairs_refs_list.get(key)\r"},{"line_number":219,"context_line":"        lport_id \u003d lport.get_id()\r"},{"line_number":220,"context_line":"        if ip_refs_list is not None:\r"},{"line_number":221,"context_line":"            if lport_id not in ip_refs_list:\r"},{"line_number":222,"context_line":"                # add this ip to refs list\r"},{"line_number":223,"context_line":"                ip_refs_list.append(lport_id)\r"},{"line_number":224,"context_line":"        else:\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_7825c8c0","line":221,"range":{"start_line":221,"start_character":12,"end_line":221,"end_character":44},"in_reply_to":"9a89bdaa_92bd1d05","updated":"2016-09-14 09:12:50.000000000","message":"no need for process else.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":215,"context_line":"\r"},{"line_number":216,"context_line":"        network_id \u003d lport.get_lswitch_id()\r"},{"line_number":217,"context_line":"        key \u003d (network_id, ip)\r"},{"line_number":218,"context_line":"        ip_refs_list \u003d self.allowed_address_pairs_refs_list.get(key)\r"},{"line_number":219,"context_line":"        lport_id \u003d lport.get_id()\r"},{"line_number":220,"context_line":"        if ip_refs_list is not None:\r"},{"line_number":221,"context_line":"            if lport_id not in ip_refs_list:\r"},{"line_number":222,"context_line":"                # add this ip to refs list\r"},{"line_number":223,"context_line":"                ip_refs_list.append(lport_id)\r"},{"line_number":224,"context_line":"        else:\r"},{"line_number":225,"context_line":"            # create a refs list of this ip\r"},{"line_number":226,"context_line":"            self.allowed_address_pairs_refs_list[key] \u003d [lport_id]\r"},{"line_number":227,"context_line":"\r"},{"line_number":228,"context_line":"    def _remove_target_ip(self, ip, lport):\r"},{"line_number":229,"context_line":"        network_id \u003d lport.get_lswitch_id()\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_533af2e7","line":226,"range":{"start_line":218,"start_character":0,"end_line":226,"end_character":66},"updated":"2016-09-08 09:33:24.000000000","message":"with all these logic here and in _remove_target_ip, I would suggest using collections.defaultdict, see [1]. It will simply code here. And again, ip_refs_list should be a set instead of list.\n\n[1] https://docs.python.org/2/library/collections.html#collections.defaultdict","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":215,"context_line":"\r"},{"line_number":216,"context_line":"        network_id \u003d lport.get_lswitch_id()\r"},{"line_number":217,"context_line":"        key \u003d (network_id, ip)\r"},{"line_number":218,"context_line":"        ip_refs_list \u003d self.allowed_address_pairs_refs_list.get(key)\r"},{"line_number":219,"context_line":"        lport_id \u003d lport.get_id()\r"},{"line_number":220,"context_line":"        if ip_refs_list is not None:\r"},{"line_number":221,"context_line":"            if lport_id not in ip_refs_list:\r"},{"line_number":222,"context_line":"                # add this ip to refs list\r"},{"line_number":223,"context_line":"                ip_refs_list.append(lport_id)\r"},{"line_number":224,"context_line":"        else:\r"},{"line_number":225,"context_line":"            # create a refs list of this ip\r"},{"line_number":226,"context_line":"            self.allowed_address_pairs_refs_list[key] \u003d [lport_id]\r"},{"line_number":227,"context_line":"\r"},{"line_number":228,"context_line":"    def _remove_target_ip(self, ip, lport):\r"},{"line_number":229,"context_line":"        network_id \u003d lport.get_lswitch_id()\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_b82f50a0","line":226,"range":{"start_line":218,"start_character":0,"end_line":226,"end_character":66},"in_reply_to":"9a89bdaa_533af2e7","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":286,"context_line":"\r"},{"line_number":287,"context_line":"    def add_local_port(self, lport):\r"},{"line_number":288,"context_line":"        if self.get_datapath() is None:\r"},{"line_number":289,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":290,"context_line":"            return\r"},{"line_number":291,"context_line":"\r"},{"line_number":292,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_8e753165","line":289,"range":{"start_line":289,"start_character":0,"end_line":289,"end_character":46},"updated":"2016-09-08 09:33:24.000000000","message":"This log seems not needed, I don\u0027t see similar log in other app.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":286,"context_line":"\r"},{"line_number":287,"context_line":"    def add_local_port(self, lport):\r"},{"line_number":288,"context_line":"        if self.get_datapath() is None:\r"},{"line_number":289,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":290,"context_line":"            return\r"},{"line_number":291,"context_line":"\r"},{"line_number":292,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_a2ce3d58","line":289,"range":{"start_line":289,"start_character":0,"end_line":289,"end_character":46},"in_reply_to":"9a89bdaa_8e753165","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":295,"context_line":"\r"},{"line_number":296,"context_line":"    def update_local_port(self, lport, original_lport):\r"},{"line_number":297,"context_line":"        if self.get_datapath() is None:\r"},{"line_number":298,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":299,"context_line":"            return\r"},{"line_number":300,"context_line":"\r"},{"line_number":301,"context_line":"        ips_set \u003d set(self._get_ips_in_allowed_address_pairs(lport))\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_aef755d1","line":298,"range":{"start_line":298,"start_character":0,"end_line":298,"end_character":46},"updated":"2016-09-08 09:33:24.000000000","message":"This log seems not needed, I don\u0027t see similar log in other app.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":295,"context_line":"\r"},{"line_number":296,"context_line":"    def update_local_port(self, lport, original_lport):\r"},{"line_number":297,"context_line":"        if self.get_datapath() is None:\r"},{"line_number":298,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":299,"context_line":"            return\r"},{"line_number":300,"context_line":"\r"},{"line_number":301,"context_line":"        ips_set \u003d set(self._get_ips_in_allowed_address_pairs(lport))\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_82d141fe","line":298,"range":{"start_line":298,"start_character":0,"end_line":298,"end_character":46},"in_reply_to":"9a89bdaa_aef755d1","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":299,"context_line":"            return\r"},{"line_number":300,"context_line":"\r"},{"line_number":301,"context_line":"        ips_set \u003d set(self._get_ips_in_allowed_address_pairs(lport))\r"},{"line_number":302,"context_line":"        original_ips_set \u003d set(self._get_ips_in_allowed_address_pairs(\r"},{"line_number":303,"context_line":"            original_lport))\r"},{"line_number":304,"context_line":"\r"},{"line_number":305,"context_line":"        for target_ip in ips_set - original_ips_set:\r"},{"line_number":306,"context_line":"            self._add_target_ip(target_ip, lport)\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_4e0ec9e5","line":303,"range":{"start_line":301,"start_character":0,"end_line":303,"end_character":28},"updated":"2016-09-08 09:33:24.000000000","message":"If _get_ips_in_allowed_address_pairs returns set, you don\u0027t need to convert there.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":299,"context_line":"            return\r"},{"line_number":300,"context_line":"\r"},{"line_number":301,"context_line":"        ips_set \u003d set(self._get_ips_in_allowed_address_pairs(lport))\r"},{"line_number":302,"context_line":"        original_ips_set \u003d set(self._get_ips_in_allowed_address_pairs(\r"},{"line_number":303,"context_line":"            original_lport))\r"},{"line_number":304,"context_line":"\r"},{"line_number":305,"context_line":"        for target_ip in ips_set - original_ips_set:\r"},{"line_number":306,"context_line":"            self._add_target_ip(target_ip, lport)\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_62ec35c8","line":303,"range":{"start_line":301,"start_character":0,"end_line":303,"end_character":28},"in_reply_to":"9a89bdaa_4e0ec9e5","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":310,"context_line":"\r"},{"line_number":311,"context_line":"    def remove_local_port(self, lport):\r"},{"line_number":312,"context_line":"        if self.get_datapath() is None:\r"},{"line_number":313,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":314,"context_line":"            return\r"},{"line_number":315,"context_line":"\r"},{"line_number":316,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_2e3265a7","line":313,"range":{"start_line":313,"start_character":0,"end_line":313,"end_character":46},"updated":"2016-09-08 09:33:24.000000000","message":"This log seems not needed, I don\u0027t see similar log in other app.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":310,"context_line":"\r"},{"line_number":311,"context_line":"    def remove_local_port(self, lport):\r"},{"line_number":312,"context_line":"        if self.get_datapath() is None:\r"},{"line_number":313,"context_line":"            LOG.error(_LE(\"datapath is none\"))\r"},{"line_number":314,"context_line":"            return\r"},{"line_number":315,"context_line":"\r"},{"line_number":316,"context_line":"        ips \u003d self._get_ips_in_allowed_address_pairs(lport)\r"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_42e739e4","line":313,"range":{"start_line":313,"start_character":0,"end_line":313,"end_character":46},"in_reply_to":"9a89bdaa_2e3265a7","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1ff9cf93fb48e5a8571a1697fc7dac7ef1aae03e","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\r"},{"line_number":16,"context_line":"import netaddr\r"},{"line_number":17,"context_line":"\r"},{"line_number":18,"context_line":"from collections import defaultdict\r"},{"line_number":19,"context_line":"from oslo_log import log\r"},{"line_number":20,"context_line":"from oslo_service import loopingcall\r"},{"line_number":21,"context_line":"from ryu.lib.packet import arp\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_163e26da","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":35},"updated":"2016-10-19 09:21:31.000000000","message":"import collections\nhttps://review.openstack.org/#/c/375833/","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"14d52327a6d2fa83d8bbd58b44e132054fa68527","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\r"},{"line_number":16,"context_line":"import netaddr\r"},{"line_number":17,"context_line":"\r"},{"line_number":18,"context_line":"from collections import defaultdict\r"},{"line_number":19,"context_line":"from oslo_log import log\r"},{"line_number":20,"context_line":"from oslo_service import loopingcall\r"},{"line_number":21,"context_line":"from ryu.lib.packet import arp\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_7dae3699","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":35},"in_reply_to":"fa6399be_163e26da","updated":"2016-10-20 04:02:03.000000000","message":"Done","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1ff9cf93fb48e5a8571a1697fc7dac7ef1aae03e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from dragonflow._i18n import _LE, _LI\r"},{"line_number":26,"context_line":"from dragonflow.controller.common import constants as controller_const\r"},{"line_number":27,"context_line":"from dragonflow.controller.common import utils\r"},{"line_number":28,"context_line":"from dragonflow.controller.df_base_app import DFlowApp\r"},{"line_number":29,"context_line":"from dragonflow.db import api_nb\r"},{"line_number":30,"context_line":"\r"},{"line_number":31,"context_line":"LOG \u003d log.getLogger(__name__)\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_5607be1c","line":28,"range":{"start_line":28,"start_character":27,"end_line":28,"end_character":54},"updated":"2016-10-19 09:21:31.000000000","message":"ditto","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"14d52327a6d2fa83d8bbd58b44e132054fa68527","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from dragonflow._i18n import _LE, _LI\r"},{"line_number":26,"context_line":"from dragonflow.controller.common import constants as controller_const\r"},{"line_number":27,"context_line":"from dragonflow.controller.common import utils\r"},{"line_number":28,"context_line":"from dragonflow.controller.df_base_app import DFlowApp\r"},{"line_number":29,"context_line":"from dragonflow.db import api_nb\r"},{"line_number":30,"context_line":"\r"},{"line_number":31,"context_line":"LOG \u003d log.getLogger(__name__)\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_fd9a466d","line":28,"range":{"start_line":28,"start_character":27,"end_line":28,"end_character":54},"in_reply_to":"fa6399be_5607be1c","updated":"2016-10-20 04:02:03.000000000","message":"Done","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1ff9cf93fb48e5a8571a1697fc7dac7ef1aae03e","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                      \u0027lport_id\u0027: active_port.get_detected_lport_id()})\r"},{"line_number":200,"context_line":"            self.nb_api.update_active_port(\r"},{"line_number":201,"context_line":"                id\u003dkey,\r"},{"line_number":202,"context_line":"                topic\u003dactive_port.get_topic(),\r"},{"line_number":203,"context_line":"                network_id\u003dactive_port.get_network_id(),\r"},{"line_number":204,"context_line":"                ip\u003dactive_port.get_ip(),\r"},{"line_number":205,"context_line":"                detected_mac\u003dactive_port.get_detected_mac(),\r"},{"line_number":206,"context_line":"                detected_lport_id\u003dactive_port.get_detected_lport_id())\r"},{"line_number":207,"context_line":"\r"},{"line_number":208,"context_line":"    def _remove_active_port_from_db_by_lport(self, network_id, ip, lport):\r"},{"line_number":209,"context_line":"        key \u003d network_id + ip\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_6477a802","line":206,"range":{"start_line":202,"start_character":16,"end_line":206,"end_character":70},"updated":"2016-10-19 09:21:31.000000000","message":"nit:\ntopic\u003dtopic,\nnetwork_id\u003dnetwork_id,\nip\u003dip,\ndetected_mac\u003dmac,\ndetected_lport_id\u003dfound_lport.get_id()","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"14d52327a6d2fa83d8bbd58b44e132054fa68527","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                      \u0027lport_id\u0027: active_port.get_detected_lport_id()})\r"},{"line_number":200,"context_line":"            self.nb_api.update_active_port(\r"},{"line_number":201,"context_line":"                id\u003dkey,\r"},{"line_number":202,"context_line":"                topic\u003dactive_port.get_topic(),\r"},{"line_number":203,"context_line":"                network_id\u003dactive_port.get_network_id(),\r"},{"line_number":204,"context_line":"                ip\u003dactive_port.get_ip(),\r"},{"line_number":205,"context_line":"                detected_mac\u003dactive_port.get_detected_mac(),\r"},{"line_number":206,"context_line":"                detected_lport_id\u003dactive_port.get_detected_lport_id())\r"},{"line_number":207,"context_line":"\r"},{"line_number":208,"context_line":"    def _remove_active_port_from_db_by_lport(self, network_id, ip, lport):\r"},{"line_number":209,"context_line":"        key \u003d network_id + ip\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_fd716645","line":206,"range":{"start_line":202,"start_character":16,"end_line":206,"end_character":70},"in_reply_to":"fa6399be_6477a802","updated":"2016-10-20 04:02:03.000000000","message":"Done","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1851b5aff5af7ba838e23ce3702a9429e1e819db","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            \u0027network_id\u0027: network_id,\r"},{"line_number":188,"context_line":"            \u0027ip\u0027: ip,\r"},{"line_number":189,"context_line":"            \u0027detected_mac\u0027: mac,\r"},{"line_number":190,"context_line":"            \u0027detected_lport_id\u0027: found_lport.get_id(),\r"},{"line_number":191,"context_line":"            \u0027topic\u0027: topic\r"},{"line_number":192,"context_line":"        })\r"},{"line_number":193,"context_line":"        key \u003d network_id + ip\r"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_30e300db","line":190,"range":{"start_line":190,"start_character":33,"end_line":190,"end_character":53},"updated":"2016-10-20 07:20:07.000000000","message":"nit:found_lport.get_id() has appeared multi times:)","commit_id":"ac5b5d286218ee0742cd8a824532a06233612d3d"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"7992748b8150f74b938126059648648d84988cf6","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            \u0027network_id\u0027: network_id,\r"},{"line_number":188,"context_line":"            \u0027ip\u0027: ip,\r"},{"line_number":189,"context_line":"            \u0027detected_mac\u0027: mac,\r"},{"line_number":190,"context_line":"            \u0027detected_lport_id\u0027: found_lport.get_id(),\r"},{"line_number":191,"context_line":"            \u0027topic\u0027: topic\r"},{"line_number":192,"context_line":"        })\r"},{"line_number":193,"context_line":"        key \u003d network_id + ip\r"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_13de0611","line":190,"range":{"start_line":190,"start_character":33,"end_line":190,"end_character":53},"in_reply_to":"fa6399be_30e300db","updated":"2016-10-20 07:49:57.000000000","message":"Done","commit_id":"ac5b5d286218ee0742cd8a824532a06233612d3d"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1851b5aff5af7ba838e23ce3702a9429e1e819db","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                     {\u0027ip\u0027: ip, \u0027mac\u0027: mac,\r"},{"line_number":199,"context_line":"                      \u0027lport_id\u0027: active_port.get_detected_lport_id()})\r"},{"line_number":200,"context_line":"            if old_active_port:\r"},{"line_number":201,"context_line":"                self.nb_api.update_active_port(\r"},{"line_number":202,"context_line":"                    id\u003dkey,\r"},{"line_number":203,"context_line":"                    topic\u003dtopic,\r"},{"line_number":204,"context_line":"                    detected_mac\u003dmac,\r"},{"line_number":205,"context_line":"                    detected_lport_id\u003dfound_lport.get_id())\r"},{"line_number":206,"context_line":"            else:\r"},{"line_number":207,"context_line":"                self.nb_api.create_active_port(\r"},{"line_number":208,"context_line":"                    id\u003dkey,\r"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_d04644bf","line":205,"range":{"start_line":201,"start_character":16,"end_line":205,"end_character":59},"updated":"2016-10-20 07:20:07.000000000","message":"If you have considered this situation, the topic should be unchanged for dif active ports, so you do not need to pass the topic arg here.","commit_id":"ac5b5d286218ee0742cd8a824532a06233612d3d"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"7992748b8150f74b938126059648648d84988cf6","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                     {\u0027ip\u0027: ip, \u0027mac\u0027: mac,\r"},{"line_number":199,"context_line":"                      \u0027lport_id\u0027: active_port.get_detected_lport_id()})\r"},{"line_number":200,"context_line":"            if old_active_port:\r"},{"line_number":201,"context_line":"                self.nb_api.update_active_port(\r"},{"line_number":202,"context_line":"                    id\u003dkey,\r"},{"line_number":203,"context_line":"                    topic\u003dtopic,\r"},{"line_number":204,"context_line":"                    detected_mac\u003dmac,\r"},{"line_number":205,"context_line":"                    detected_lport_id\u003dfound_lport.get_id())\r"},{"line_number":206,"context_line":"            else:\r"},{"line_number":207,"context_line":"                self.nb_api.create_active_port(\r"},{"line_number":208,"context_line":"                    id\u003dkey,\r"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa6399be_f348b2b5","line":205,"range":{"start_line":201,"start_character":16,"end_line":205,"end_character":59},"in_reply_to":"fa6399be_d04644bf","updated":"2016-10-20 07:49:57.000000000","message":"calling the method with parameter \u0027topic\u0027 can help to get old date by \u0027topic\u0027 and key. Besides, those \u0027topic\u0027 parameter are got from detected lport which could change, through the \u0027topic\u0027 of detected lport could not be changed in actually.","commit_id":"ac5b5d286218ee0742cd8a824532a06233612d3d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"\r"},{"line_number":31,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":32,"context_line":"\r"},{"line_number":33,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"\r"},{"line_number":36,"context_line":"class ActivePortDetectionApp(df_base_app.DFlowApp):\r"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_1991129a","line":33,"range":{"start_line":33,"start_character":22,"end_line":33,"end_character":24},"updated":"2016-11-15 22:04:52.000000000","message":"Consider making this a configurable variable.","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":30,"context_line":"\r"},{"line_number":31,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":32,"context_line":"\r"},{"line_number":33,"context_line":"ARP_DETECT_INTERVAL \u003d 30\r"},{"line_number":34,"context_line":"\r"},{"line_number":35,"context_line":"\r"},{"line_number":36,"context_line":"class ActivePortDetectionApp(df_base_app.DFlowApp):\r"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_1a2d3dfe","line":33,"range":{"start_line":33,"start_character":22,"end_line":33,"end_character":24},"in_reply_to":"7a77a97e_1991129a","updated":"2016-11-17 07:14:59.000000000","message":"Done","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    When this application is loaded, packets to the address in a allowed\r"},{"line_number":41,"context_line":"    address pair will be only sent to the VM port which has been detected\r"},{"line_number":42,"context_line":"    active for this address. Otherwise, those packets will be broadcast to\r"},{"line_number":43,"context_line":"    all VM ports with this address in the allowed address pair.\r"},{"line_number":44,"context_line":"    \"\"\"\r"},{"line_number":45,"context_line":"\r"},{"line_number":46,"context_line":"    def __init__(self, *args, **kwargs):\r"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_94b087df","line":43,"updated":"2016-11-15 22:04:52.000000000","message":"This app only handles the detection of active ports. It does not deal with actually re-routing packets only to the active port. Please update the documentation.","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    When this application is loaded, packets to the address in a allowed\r"},{"line_number":41,"context_line":"    address pair will be only sent to the VM port which has been detected\r"},{"line_number":42,"context_line":"    active for this address. Otherwise, those packets will be broadcast to\r"},{"line_number":43,"context_line":"    all VM ports with this address in the allowed address pair.\r"},{"line_number":44,"context_line":"    \"\"\"\r"},{"line_number":45,"context_line":"\r"},{"line_number":46,"context_line":"    def __init__(self, *args, **kwargs):\r"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_1aeb7d14","line":43,"in_reply_to":"7a77a97e_94b087df","updated":"2016-11-17 07:14:59.000000000","message":"Done","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5ad16c8927f24661ad86aff15e964dbe46d3205a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"DF_ACTIVE_PORT_DETECTION_APP_OPTS \u003d [\r"},{"line_number":35,"context_line":"    cfg.IntOpt(\u0027detection_interval_time\u0027,\r"},{"line_number":36,"context_line":"               default\u003d30,\r"},{"line_number":37,"context_line":"               help\u003d_(\"Interval time of sending detection arp packets.\"))\r"}],"source_content_type":"text/x-python","patch_set":39,"id":"7a77a97e_1776e805","line":34,"updated":"2016-11-17 09:58:34.000000000","message":"Please place config options in dragonflow/conf. See https://review.openstack.org/#/c/394282 for example.","commit_id":"fec0818f1f85deae442085db1d552b93733ec628"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"bb4a90efd33a27ecd09f752b72ccb57e037bef03","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"LOG \u003d log.getLogger(__name__)\r"},{"line_number":33,"context_line":"\r"},{"line_number":34,"context_line":"DF_ACTIVE_PORT_DETECTION_APP_OPTS \u003d [\r"},{"line_number":35,"context_line":"    cfg.IntOpt(\u0027detection_interval_time\u0027,\r"},{"line_number":36,"context_line":"               default\u003d30,\r"},{"line_number":37,"context_line":"               help\u003d_(\"Interval time of sending detection arp packets.\"))\r"}],"source_content_type":"text/x-python","patch_set":39,"id":"7a77a97e_b1cc32bc","line":34,"in_reply_to":"7a77a97e_1776e805","updated":"2016-11-18 06:55:39.000000000","message":"Done","commit_id":"fec0818f1f85deae442085db1d552b93733ec628"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3da3d689e134dff89a7f506dccff90a15fd094dd","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import collections\r"},{"line_number":17,"context_line":"import netaddr\r"},{"line_number":18,"context_line":"\r"},{"line_number":19,"context_line":"from oslo_config import cfg\r"},{"line_number":20,"context_line":"from oslo_log import log\r"},{"line_number":21,"context_line":"from oslo_service import loopingcall\r"},{"line_number":22,"context_line":"from ryu.lib.packet import arp\r"}],"source_content_type":"text/x-python","patch_set":41,"id":"7a77a97e_5cd047c9","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":27},"updated":"2016-11-18 13:02:02.000000000","message":"Use \n\nfrom dragonflow import conf as cfg\n\nhere to make the static code in dragonflow.conf.__init__ to be executed. So that the option will be registered.","commit_id":"5433645c3501b3fc045e0a550693e93f0a878e60"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"47cc05016f13744c5beb93ab96d7b9b8e8e7fa94","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import collections\r"},{"line_number":17,"context_line":"import netaddr\r"},{"line_number":18,"context_line":"\r"},{"line_number":19,"context_line":"from oslo_config import cfg\r"},{"line_number":20,"context_line":"from oslo_log import log\r"},{"line_number":21,"context_line":"from oslo_service import loopingcall\r"},{"line_number":22,"context_line":"from ryu.lib.packet import arp\r"}],"source_content_type":"text/x-python","patch_set":41,"id":"7a77a97e_2c524a67","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":27},"in_reply_to":"7a77a97e_5cd047c9","updated":"2016-11-21 02:57:22.000000000","message":"Thank you to point that, I will try fullstack after this bug fixed.","commit_id":"5433645c3501b3fc045e0a550693e93f0a878e60"}],"dragonflow/controller/common/utils.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    apps_list \u003d cfg.CONF.df.apps_list"},{"line_number":65,"context_line":"    if ACTIVE_PORT_DETECTION_APP in apps_list:"},{"line_number":66,"context_line":"        return True"},{"line_number":67,"context_line":"    else:"},{"line_number":68,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_0eca011b","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":9},"updated":"2016-09-08 09:33:24.000000000","message":"nit: else is not required here.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"c759b73bce1aca1861e9493095c0a01d04052d22","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    apps_list \u003d cfg.CONF.df.apps_list"},{"line_number":65,"context_line":"    if ACTIVE_PORT_DETECTION_APP in apps_list:"},{"line_number":66,"context_line":"        return True"},{"line_number":67,"context_line":"    else:"},{"line_number":68,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_729fb950","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":9},"updated":"2016-09-09 06:20:05.000000000","message":"yes,I think so","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    apps_list \u003d cfg.CONF.df.apps_list"},{"line_number":65,"context_line":"    if ACTIVE_PORT_DETECTION_APP in apps_list:"},{"line_number":66,"context_line":"        return True"},{"line_number":67,"context_line":"    else:"},{"line_number":68,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_a20e3a32","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":9},"in_reply_to":"9a89bdaa_0eca011b","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    apps_list \u003d cfg.CONF.df.apps_list"},{"line_number":65,"context_line":"    if ACTIVE_PORT_DETECTION_APP in apps_list:"},{"line_number":66,"context_line":"        return True"},{"line_number":67,"context_line":"    else:"},{"line_number":68,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_c213465b","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":9},"in_reply_to":"9a89bdaa_729fb950","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"cd914c5acdcdea79b39a4e4bbbb381f93b19d22d","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    return cookie ^ const.GLOBAL_INIT_AGING_COOKIE"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def check_active_port_detection_app():"},{"line_number":64,"context_line":"    apps_list \u003d cfg.CONF.df.apps_list"},{"line_number":65,"context_line":"    if ACTIVE_PORT_DETECTION_APP in apps_list:"},{"line_number":66,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8ec9b2_2fad1f84","line":63,"range":{"start_line":63,"start_character":0,"end_line":63,"end_character":38},"updated":"2016-09-22 02:49:19.000000000","message":"I don\u0027t find where this method is called, is it needed?","commit_id":"10805fd2d56dc70c0787a708951e7604f7d51b83"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"052c05ea68b8b98bb4cba919985dbeafb5306083","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    return cookie ^ const.GLOBAL_INIT_AGING_COOKIE"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def check_active_port_detection_app():"},{"line_number":64,"context_line":"    apps_list \u003d cfg.CONF.df.apps_list"},{"line_number":65,"context_line":"    if ACTIVE_PORT_DETECTION_APP in apps_list:"},{"line_number":66,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a95cdbc_6c69e7f8","line":63,"range":{"start_line":63,"start_character":0,"end_line":63,"end_character":38},"in_reply_to":"7a8ec9b2_2fad1f84","updated":"2016-10-08 11:11:20.000000000","message":"This method will be used by following patches, to check if the active port detection is configured.","commit_id":"10805fd2d56dc70c0787a708951e7604f7d51b83"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":596,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"    def read_active_ports(self):"},{"line_number":599,"context_line":"        for active_port in self.nb_api.get_active_ports():"},{"line_number":600,"context_line":"            self.active_port_updated(active_port)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"    def get_nb_api(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_0d078c82","line":599,"range":{"start_line":599,"start_character":26,"end_line":599,"end_character":57},"updated":"2016-08-25 01:41:11.000000000","message":"Given there could be a great number of ports, you can make it a iterator","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":596,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"    def read_active_ports(self):"},{"line_number":599,"context_line":"        for active_port in self.nb_api.get_active_ports():"},{"line_number":600,"context_line":"            self.active_port_updated(active_port)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"    def get_nb_api(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_371443f4","line":599,"range":{"start_line":599,"start_character":26,"end_line":599,"end_character":57},"in_reply_to":"1ac06dbe_0d078c82","updated":"2016-09-05 13:26:50.000000000","message":"Those are not logical ports, but only active ports of which amount is not large.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"cd914c5acdcdea79b39a4e4bbbb381f93b19d22d","unresolved":false,"context_lines":[{"line_number":607,"context_line":"            if lport is not None:"},{"line_number":608,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"    def read_active_ports(self):"},{"line_number":611,"context_line":"        for active_port in self.nb_api.get_active_ports():"},{"line_number":612,"context_line":"            self.active_port_updated(active_port)"},{"line_number":613,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8ec9b2_6fe807e3","line":610,"range":{"start_line":610,"start_character":0,"end_line":610,"end_character":32},"updated":"2016-09-22 02:49:19.000000000","message":"do we need to remove old active_ports?","commit_id":"10805fd2d56dc70c0787a708951e7604f7d51b83"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"052c05ea68b8b98bb4cba919985dbeafb5306083","unresolved":false,"context_lines":[{"line_number":607,"context_line":"            if lport is not None:"},{"line_number":608,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":"    def read_active_ports(self):"},{"line_number":611,"context_line":"        for active_port in self.nb_api.get_active_ports():"},{"line_number":612,"context_line":"            self.active_port_updated(active_port)"},{"line_number":613,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"1a95cdbc_8c6c7309","line":610,"range":{"start_line":610,"start_character":0,"end_line":610,"end_character":32},"in_reply_to":"7a8ec9b2_6fe807e3","updated":"2016-10-08 11:11:20.000000000","message":"Done","commit_id":"10805fd2d56dc70c0787a708951e7604f7d51b83"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"130c2c18a7f5403402815c8d7791a9d160a62801","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"                self.read_floatingip()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"                self.active_ports_mapping()"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"            self.sync_finished \u003d True"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_529c0ac0","line":145,"range":{"start_line":145,"start_character":0,"end_line":145,"end_character":43},"updated":"2016-10-13 00:14:35.000000000","message":"I don\u0027t know why jekins don\u0027t report merge conflict, but you may need to rebase here.","commit_id":"8547c4e3caccb9afc0038dd91e49838a8f4db1ed"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"1c1d59b211ee4fd7d7f8f1c92a2cf96c6b57f649","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"                self.read_floatingip()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"                self.active_ports_mapping()"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"            self.sync_finished \u003d True"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_00e95814","line":145,"range":{"start_line":145,"start_character":0,"end_line":145,"end_character":43},"in_reply_to":"fa6399be_529c0ac0","updated":"2016-10-13 01:54:19.000000000","message":"I noticed the conflicts between patches, but I think maybe I can wait for those conflicts patches merged before I rebase this patch.","commit_id":"8547c4e3caccb9afc0038dd91e49838a8f4db1ed"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d7669a484ac2eee75a13509af42cdce60ac33a12","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                for item in reversed(items):"},{"line_number":188,"context_line":"                    item.delete()"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                self.active_ports_mapping()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            self.sync_finished \u003d True"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_76d2dbd3","line":190,"range":{"start_line":190,"start_character":0,"end_line":190,"end_character":43},"updated":"2016-10-13 06:33:30.000000000","message":"Since you have rebased  with latest code, Maybe you need to add active port in the way above.","commit_id":"4e5a1fa0a0d1da6d0af48593f55ec63229fb308a"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"e34d95282a195e4a4cb015d71a3d4abadd30e7d3","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                for item in reversed(items):"},{"line_number":188,"context_line":"                    item.delete()"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"                self.active_ports_mapping()"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            self.sync_finished \u003d True"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_0c46eebe","line":190,"range":{"start_line":190,"start_character":0,"end_line":190,"end_character":43},"in_reply_to":"fa6399be_76d2dbd3","updated":"2016-10-13 07:30:02.000000000","message":"ok, I update those codes in according the above codes:)","commit_id":"4e5a1fa0a0d1da6d0af48593f55ec63229fb308a"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1ff9cf93fb48e5a8571a1697fc7dac7ef1aae03e","unresolved":false,"context_lines":[{"line_number":664,"context_line":"        if lport is not None:"},{"line_number":665,"context_line":"            self.db_store.update_active_port(active_port.get_id(),"},{"line_number":666,"context_line":"                                             active_port)"},{"line_number":667,"context_line":"            self.open_flow_app.notify_update_active_port(active_port,"},{"line_number":668,"context_line":"                                                         old_active_port)"},{"line_number":669,"context_line":"        else:"},{"line_number":670,"context_line":"            LOG.info(_LI(\"The logical port is not ready for the \""},{"line_number":671,"context_line":"                         \"active node: %s\") % str(active_port))"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_2acad94f","line":668,"range":{"start_line":667,"start_character":12,"end_line":668,"end_character":73},"updated":"2016-10-19 09:21:31.000000000","message":"if the old active port is same to the new one, we do not need to notify apps, right?","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"14d52327a6d2fa83d8bbd58b44e132054fa68527","unresolved":false,"context_lines":[{"line_number":664,"context_line":"        if lport is not None:"},{"line_number":665,"context_line":"            self.db_store.update_active_port(active_port.get_id(),"},{"line_number":666,"context_line":"                                             active_port)"},{"line_number":667,"context_line":"            self.open_flow_app.notify_update_active_port(active_port,"},{"line_number":668,"context_line":"                                                         old_active_port)"},{"line_number":669,"context_line":"        else:"},{"line_number":670,"context_line":"            LOG.info(_LI(\"The logical port is not ready for the \""},{"line_number":671,"context_line":"                         \"active node: %s\") % str(active_port))"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_3de03ecc","line":668,"range":{"start_line":667,"start_character":12,"end_line":668,"end_character":73},"in_reply_to":"fa6399be_2acad94f","updated":"2016-10-20 04:02:03.000000000","message":"That comparison has been done in the ActivePortDetectionApp, only when the new active port is not equals to the old one, the app will change DB and publish this change event. So we don\u0027t need extra comparison here.","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        lport \u003d self.db_store.get_local_port(lport_id,"},{"line_number":617,"context_line":"                                             active_port.get_topic())"},{"line_number":618,"context_line":"        LOG.info(_LI(\"Active port updated. Active port \u003d %(new)s, \""},{"line_number":619,"context_line":"                     \"old active port \u003d %(old)s\") %"},{"line_number":620,"context_line":"                 {\u0027new\u0027: str(active_port), \u0027old\u0027: str(old_active_port)})"},{"line_number":621,"context_line":"        if lport is not None:"},{"line_number":622,"context_line":"            self.db_store.update_active_port(active_port.get_id(),"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_d9b07a8e","line":619,"range":{"start_line":619,"start_character":50,"end_line":619,"end_character":51},"updated":"2016-11-15 22:04:52.000000000","message":"Please postpone string format into LOG command. i.e. % -\u003e ,","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        lport \u003d self.db_store.get_local_port(lport_id,"},{"line_number":617,"context_line":"                                             active_port.get_topic())"},{"line_number":618,"context_line":"        LOG.info(_LI(\"Active port updated. Active port \u003d %(new)s, \""},{"line_number":619,"context_line":"                     \"old active port \u003d %(old)s\") %"},{"line_number":620,"context_line":"                 {\u0027new\u0027: str(active_port), \u0027old\u0027: str(old_active_port)})"},{"line_number":621,"context_line":"        if lport is not None:"},{"line_number":622,"context_line":"            self.db_store.update_active_port(active_port.get_id(),"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_3a8039c0","line":619,"range":{"start_line":619,"start_character":50,"end_line":619,"end_character":51},"in_reply_to":"7a77a97e_d9b07a8e","updated":"2016-11-17 07:14:59.000000000","message":"Done","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":617,"context_line":"                                             active_port.get_topic())"},{"line_number":618,"context_line":"        LOG.info(_LI(\"Active port updated. Active port \u003d %(new)s, \""},{"line_number":619,"context_line":"                     \"old active port \u003d %(old)s\") %"},{"line_number":620,"context_line":"                 {\u0027new\u0027: str(active_port), \u0027old\u0027: str(old_active_port)})"},{"line_number":621,"context_line":"        if lport is not None:"},{"line_number":622,"context_line":"            self.db_store.update_active_port(active_port.get_id(),"},{"line_number":623,"context_line":"                                             active_port)"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_59638a1a","line":620,"range":{"start_line":620,"start_character":25,"end_line":620,"end_character":28},"updated":"2016-11-15 22:04:52.000000000","message":"No need for str() call here","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":617,"context_line":"                                             active_port.get_topic())"},{"line_number":618,"context_line":"        LOG.info(_LI(\"Active port updated. Active port \u003d %(new)s, \""},{"line_number":619,"context_line":"                     \"old active port \u003d %(old)s\") %"},{"line_number":620,"context_line":"                 {\u0027new\u0027: str(active_port), \u0027old\u0027: str(old_active_port)})"},{"line_number":621,"context_line":"        if lport is not None:"},{"line_number":622,"context_line":"            self.db_store.update_active_port(active_port.get_id(),"},{"line_number":623,"context_line":"                                             active_port)"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_5a8175c2","line":620,"range":{"start_line":620,"start_character":25,"end_line":620,"end_character":28},"in_reply_to":"7a77a97e_59638a1a","updated":"2016-11-17 07:14:59.000000000","message":"Done","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"373fdd815a6084e5163dda758ddff2339c6dd2c9","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self.open_flow_app.notify_remove_logical_switch(lswitch)"},{"line_number":241,"context_line":"        self.db_store.del_lswitch(lswitch_id)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _notify_active_ports_updated_when_lport_created(self, lport):"},{"line_number":244,"context_line":"        active_ports \u003d self.nb_api.get_active_ports(lport.get_topic())"},{"line_number":245,"context_line":"        for active_port in active_ports:"},{"line_number":246,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a74a57a_9d818b92","line":243,"updated":"2016-12-01 16:12:32.000000000","message":"For this patch this is all right.\n\nIn future, we need to find a way to make these methods more dynamic. Maybe let applications notify other applications in some way?","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"c4681e5a1239c42fed8948d7fe693fa5cbbb971f","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self.open_flow_app.notify_remove_logical_switch(lswitch)"},{"line_number":241,"context_line":"        self.db_store.del_lswitch(lswitch_id)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _notify_active_ports_updated_when_lport_created(self, lport):"},{"line_number":244,"context_line":"        active_ports \u003d self.nb_api.get_active_ports(lport.get_topic())"},{"line_number":245,"context_line":"        for active_port in active_ports:"},{"line_number":246,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_6d8def7a","line":243,"in_reply_to":"5a74a57a_9d818b92","updated":"2016-12-08 10:04:11.000000000","message":"Yes, a more dynamic or common way is better. I think this could wait util other feature have same requirement.","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"}],"dragonflow/controller/ryu_base_app.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.dispatcher.dispatch(\u0027delete_floatingip\u0027, floatingip)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def notify_update_active_port(self, active_port, old_active_port):"},{"line_number":146,"context_line":"        self.dispatcher.dispatch(\u0027update_active_port\u0027,"},{"line_number":147,"context_line":"                                 active_port\u003dactive_port,"},{"line_number":148,"context_line":"                                 old_active_port\u003dold_active_port)"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_823a65e5","line":146,"range":{"start_line":146,"start_character":34,"end_line":146,"end_character":52},"updated":"2016-09-08 09:33:24.000000000","message":"I can\u0027t find the use of update_active_port, I guess it will be used in another patch, right?","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.dispatcher.dispatch(\u0027delete_floatingip\u0027, floatingip)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def notify_update_active_port(self, active_port, old_active_port):"},{"line_number":146,"context_line":"        self.dispatcher.dispatch(\u0027update_active_port\u0027,"},{"line_number":147,"context_line":"                                 active_port\u003dactive_port,"},{"line_number":148,"context_line":"                                 old_active_port\u003dold_active_port)"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_a2039a72","line":146,"range":{"start_line":146,"start_character":34,"end_line":146,"end_character":52},"in_reply_to":"9a89bdaa_823a65e5","updated":"2016-09-14 09:12:50.000000000","message":"yes, the processing for this event in apps will be uploaded in other patches. But I suggest to remain those APIs in this patch, other patches will be uploaded just when this patch has been merged.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"c759b73bce1aca1861e9493095c0a01d04052d22","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                                 old_active_port\u003dold_active_port)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def notify_remove_active_port(self, active_port):"},{"line_number":151,"context_line":"        self.dispatcher.dispatch(\u0027remove_active_port\u0027, active_port)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    @set_ev_handler(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)"},{"line_number":154,"context_line":"    def switch_features_handler(self, ev):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_12e74dad","line":151,"range":{"start_line":151,"start_character":34,"end_line":151,"end_character":52},"updated":"2016-09-09 06:20:05.000000000","message":"same to remove_active_port as above","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                                 old_active_port\u003dold_active_port)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def notify_remove_active_port(self, active_port):"},{"line_number":151,"context_line":"        self.dispatcher.dispatch(\u0027remove_active_port\u0027, active_port)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    @set_ev_handler(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)"},{"line_number":154,"context_line":"    def switch_features_handler(self, ev):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_8235be47","line":151,"range":{"start_line":151,"start_character":34,"end_line":151,"end_character":52},"in_reply_to":"9a89bdaa_12e74dad","updated":"2016-09-14 09:12:50.000000000","message":"please look the above reply.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"}],"dragonflow/controller/topology.py":[{"author":{"_account_id":20298,"name":"feipeng","email":"feipeng1@huawei.com","username":"feipeng"},"change_message_id":"c759b73bce1aca1861e9493095c0a01d04052d22","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        active_ports_keys \u003d self.db_store.get_active_port_keys(tenant_id)"},{"line_number":263,"context_line":"        for active_port_key in active_ports_keys:"},{"line_number":264,"context_line":"            self.controller.active_port_deleted(active_port_key)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        routers \u003d self.db_store.get_routers()"},{"line_number":267,"context_line":"        for router in routers:"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_129e6d07","line":264,"range":{"start_line":264,"start_character":12,"end_line":264,"end_character":64},"updated":"2016-09-09 06:20:05.000000000","message":"lport is del above, if you func use lport may cause a erro","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        active_ports_keys \u003d self.db_store.get_active_port_keys(tenant_id)"},{"line_number":263,"context_line":"        for active_port_key in active_ports_keys:"},{"line_number":264,"context_line":"            self.controller.active_port_deleted(active_port_key)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        routers \u003d self.db_store.get_routers()"},{"line_number":267,"context_line":"        for router in routers:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_a2171a50","line":264,"range":{"start_line":264,"start_character":12,"end_line":264,"end_character":64},"in_reply_to":"9a89bdaa_129e6d07","updated":"2016-09-14 09:12:50.000000000","message":"This can\u0027t occur errors for now, but seems moving this part to above is a better idea.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":22060,"name":"jingting","email":"kangjingting@huawei.com","username":"jingting"},"change_message_id":"bdda56b4be18836ec03be98c1f755596ae436389","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            if tenant_id \u003d\u003d sg_group.get_topic():"},{"line_number":305,"context_line":"                self.controller.security_group_deleted(sg_group.get_id())"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":308,"context_line":"        for switch in switches:"},{"line_number":309,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":310,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def _get_lport(self, port_id, topic\u003dNone):"},{"line_number":313,"context_line":"        lport \u003d self.db_store.get_port(port_id)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a77a97e_232ff0a1","line":310,"range":{"start_line":307,"start_character":0,"end_line":310,"end_character":71},"updated":"2016-11-18 09:52:17.000000000","message":"Is this related to this patch?","commit_id":"0a59f11d6b88856c24e51fa10ec925109c0e579a"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"77a5976009a764519876c18cfa5e38088384c81a","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            if tenant_id \u003d\u003d sg_group.get_topic():"},{"line_number":305,"context_line":"                self.controller.security_group_deleted(sg_group.get_id())"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        switches \u003d self.db_store.get_lswitchs()"},{"line_number":308,"context_line":"        for switch in switches:"},{"line_number":309,"context_line":"            if tenant_id \u003d\u003d switch.get_topic():"},{"line_number":310,"context_line":"                self.controller.logical_switch_deleted(switch.get_id())"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def _get_lport(self, port_id, topic\u003dNone):"},{"line_number":313,"context_line":"        lport \u003d self.db_store.get_port(port_id)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a77a97e_6cdfe2d5","line":310,"range":{"start_line":307,"start_character":0,"end_line":310,"end_character":71},"in_reply_to":"7a77a97e_232ff0a1","updated":"2016-11-21 02:57:29.000000000","message":"Active ports should be removed before switches, because the process of deleting active ports might use the switches.","commit_id":"0a59f11d6b88856c24e51fa10ec925109c0e579a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"373fdd815a6084e5163dda758ddff2339c6dd2c9","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    def _clear_tenant_topology(self, tenant_id):"},{"line_number":283,"context_line":"        active_ports_keys \u003d self.db_store.get_active_port_keys(tenant_id)"},{"line_number":284,"context_line":"        for active_port_key in active_ports_keys:"},{"line_number":285,"context_line":"            self.controller.active_port_deleted(active_port_key)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        ports \u003d self.db_store.get_ports()"},{"line_number":288,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_3ca5fc03","line":285,"updated":"2016-12-01 16:12:32.000000000","message":"I think you may have reverted someone else\u0027s change here. But since this will be moved in https://review.openstack.org/#/c/385350/11, that\u0027s all right as long as you synchronise with @xiaohhui.","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"c4681e5a1239c42fed8948d7fe693fa5cbbb971f","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    def _clear_tenant_topology(self, tenant_id):"},{"line_number":283,"context_line":"        active_ports_keys \u003d self.db_store.get_active_port_keys(tenant_id)"},{"line_number":284,"context_line":"        for active_port_key in active_ports_keys:"},{"line_number":285,"context_line":"            self.controller.active_port_deleted(active_port_key)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        ports \u003d self.db_store.get_ports()"},{"line_number":288,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_eab485d2","line":285,"in_reply_to":"3a71b18c_3ca5fc03","updated":"2016-12-08 10:04:11.000000000","message":"Done","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":1201,"context_line":"        self.active_port \u003d value"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    def get_id(self):"},{"line_number":1204,"context_line":"        return self.active_port[\u0027network_id\u0027] + self.active_port[\u0027ip\u0027]"},{"line_number":1205,"context_line":""},{"line_number":1206,"context_line":"    def get_topic(self):"},{"line_number":1207,"context_line":"        return self.active_port[\u0027topic\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_2b435814","line":1204,"updated":"2016-08-24 03:44:24.000000000","message":"So, one ip will have one active_port per network at most, right?","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":1201,"context_line":"        self.active_port \u003d value"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    def get_id(self):"},{"line_number":1204,"context_line":"        return self.active_port[\u0027network_id\u0027] + self.active_port[\u0027ip\u0027]"},{"line_number":1205,"context_line":""},{"line_number":1206,"context_line":"    def get_topic(self):"},{"line_number":1207,"context_line":"        return self.active_port[\u0027topic\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_d72b1732","line":1204,"in_reply_to":"1ac06dbe_2b435814","updated":"2016-09-05 13:26:50.000000000","message":"Yes, only support one VM port using the ip in the meantime for now.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":"    def __eq__(self, other):"},{"line_number":1225,"context_line":"        if isinstance(other, self.__class__):"},{"line_number":1226,"context_line":"            if (self.get_network_id() \u003d\u003d other.get_network_id()) and \\"},{"line_number":1227,"context_line":"                    (self.get_ip() \u003d\u003d other.get_ip()) and \\"},{"line_number":1228,"context_line":"                    (self.get_detected_mac() \u003d\u003d other.get_detected_mac()) and \\"},{"line_number":1229,"context_line":"                    (self.get_detected_lport_id() \u003d\u003d"},{"line_number":1230,"context_line":"                     other.get_detected_lport_id()) and \\"},{"line_number":1231,"context_line":"                    (self.get_topic() \u003d\u003d other.get_topic()):"},{"line_number":1232,"context_line":"                return True"},{"line_number":1233,"context_line":"        return False"},{"line_number":1234,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_480e9ae5","line":1231,"range":{"start_line":1226,"start_character":0,"end_line":1231,"end_character":60},"updated":"2016-08-24 03:44:24.000000000","message":"nit: it is not functional, but pep8 will prefer this style.\n\nif (a \u003d\u003d b and\n    c \u003d\u003d d and\n    e \u003d\u003d f):","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":"    def __eq__(self, other):"},{"line_number":1225,"context_line":"        if isinstance(other, self.__class__):"},{"line_number":1226,"context_line":"            if (self.get_network_id() \u003d\u003d other.get_network_id()) and \\"},{"line_number":1227,"context_line":"                    (self.get_ip() \u003d\u003d other.get_ip()) and \\"},{"line_number":1228,"context_line":"                    (self.get_detected_mac() \u003d\u003d other.get_detected_mac()) and \\"},{"line_number":1229,"context_line":"                    (self.get_detected_lport_id() \u003d\u003d"},{"line_number":1230,"context_line":"                     other.get_detected_lport_id()) and \\"},{"line_number":1231,"context_line":"                    (self.get_topic() \u003d\u003d other.get_topic()):"},{"line_number":1232,"context_line":"                return True"},{"line_number":1233,"context_line":"        return False"},{"line_number":1234,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_f7d73b21","line":1231,"range":{"start_line":1226,"start_character":0,"end_line":1231,"end_character":60},"in_reply_to":"1ac06dbe_480e9ae5","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1ff9cf93fb48e5a8571a1697fc7dac7ef1aae03e","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        for col, val in columns.items():"},{"line_number":757,"context_line":"            active_port[col] \u003d val"},{"line_number":758,"context_line":"        active_port_json \u003d jsonutils.dumps(active_port)"},{"line_number":759,"context_line":"        self.driver.create_key(\u0027activeport\u0027, id, active_port_json, topic)"},{"line_number":760,"context_line":"        self._send_db_change_event(\u0027activeport\u0027, id, \u0027set\u0027,"},{"line_number":761,"context_line":"                                   active_port_json, topic)"},{"line_number":762,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_2ac49990","line":759,"range":{"start_line":759,"start_character":8,"end_line":759,"end_character":73},"updated":"2016-10-19 09:21:31.000000000","message":"if you try to update a exist object, you should use set_key method instead of create_key","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"14d52327a6d2fa83d8bbd58b44e132054fa68527","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        for col, val in columns.items():"},{"line_number":757,"context_line":"            active_port[col] \u003d val"},{"line_number":758,"context_line":"        active_port_json \u003d jsonutils.dumps(active_port)"},{"line_number":759,"context_line":"        self.driver.create_key(\u0027activeport\u0027, id, active_port_json, topic)"},{"line_number":760,"context_line":"        self._send_db_change_event(\u0027activeport\u0027, id, \u0027set\u0027,"},{"line_number":761,"context_line":"                                   active_port_json, topic)"},{"line_number":762,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_dd93c2f8","line":759,"range":{"start_line":759,"start_character":8,"end_line":759,"end_character":73},"in_reply_to":"fa6399be_2ac49990","updated":"2016-10-20 04:02:03.000000000","message":"Done","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"3dc7c501b9b1d395b1d5c5c845e8dce82077a3c1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if self.use_pubsub:"},{"line_number":76,"context_line":"            self.publisher \u003d self._get_publisher()"},{"line_number":77,"context_line":"            self.subscriber \u003d self._get_subscriber()"},{"line_number":78,"context_line":"            self.publisher.initialize()"},{"line_number":79,"context_line":"            if self.is_neutron_server:"},{"line_number":80,"context_line":"                # Start a thread to detect DB failover in Plugin"},{"line_number":81,"context_line":"                self.publisher.set_publisher_for_failover("},{"line_number":82,"context_line":"                    self.publisher,"}],"source_content_type":"text/x-python","patch_set":33,"id":"ba5da102_8f94d4e2","line":79,"range":{"start_line":78,"start_character":12,"end_line":79,"end_character":38},"updated":"2016-10-31 08:37:23.000000000","message":"Is it part of the spec? Why initializing publisher before the check of neutron server?","commit_id":"ac2f0e9857c022836e7844b08ac11ea8770b3ecc"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"b4b9dc27cb385f883685cd0098de5f5523145623","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if self.use_pubsub:"},{"line_number":76,"context_line":"            self.publisher \u003d self._get_publisher()"},{"line_number":77,"context_line":"            self.subscriber \u003d self._get_subscriber()"},{"line_number":78,"context_line":"            self.publisher.initialize()"},{"line_number":79,"context_line":"            if self.is_neutron_server:"},{"line_number":80,"context_line":"                # Start a thread to detect DB failover in Plugin"},{"line_number":81,"context_line":"                self.publisher.set_publisher_for_failover("},{"line_number":82,"context_line":"                    self.publisher,"}],"source_content_type":"text/x-python","patch_set":33,"id":"ba5da102_f2d3735d","line":79,"range":{"start_line":78,"start_character":12,"end_line":79,"end_character":38},"in_reply_to":"ba5da102_8f94d4e2","updated":"2016-10-31 08:49:44.000000000","message":"In this implementation of the spec, local controller will save active port in DF DB and publish events to notify other controllers this DB change. So controllers will also need to be a publisher","commit_id":"ac2f0e9857c022836e7844b08ac11ea8770b3ecc"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if self.use_pubsub:"},{"line_number":76,"context_line":"            self.publisher \u003d self._get_publisher()"},{"line_number":77,"context_line":"            self.subscriber \u003d self._get_subscriber()"},{"line_number":78,"context_line":"            self.publisher.initialize()"},{"line_number":79,"context_line":"            if self.is_neutron_server:"},{"line_number":80,"context_line":"                # Start a thread to detect DB failover in Plugin"},{"line_number":81,"context_line":"                self.publisher.set_publisher_for_failover("}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_d46d9f33","line":78,"updated":"2016-11-15 22:04:52.000000000","message":"I suspect this will behave strangely on the controller if multiproc pub/sub is enabled, since the df publisher service (necessary for multiproc pub/sub) runs only on neutron server nodes.\n\nA possible solution is in _get_publisher, if this is not a neutron server, not to use the multiproc pub/sub, and always use the single proc pub/sub. (i.e. on compute nodes, pub_sub_use_multiproc is always false.)","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        if self.use_pubsub:"},{"line_number":76,"context_line":"            self.publisher \u003d self._get_publisher()"},{"line_number":77,"context_line":"            self.subscriber \u003d self._get_subscriber()"},{"line_number":78,"context_line":"            self.publisher.initialize()"},{"line_number":79,"context_line":"            if self.is_neutron_server:"},{"line_number":80,"context_line":"                # Start a thread to detect DB failover in Plugin"},{"line_number":81,"context_line":"                self.publisher.set_publisher_for_failover("}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_43a8a98d","line":78,"in_reply_to":"7a77a97e_d46d9f33","updated":"2016-11-17 07:14:59.000000000","message":"Done","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"373fdd815a6084e5163dda758ddff2339c6dd2c9","unresolved":false,"context_lines":[{"line_number":793,"context_line":"            active_port[col] \u003d val"},{"line_number":794,"context_line":"        active_port_json \u003d jsonutils.dumps(active_port)"},{"line_number":795,"context_line":"        self.driver.create_key(\u0027activeport\u0027, id, active_port_json, topic)"},{"line_number":796,"context_line":"        self._send_db_change_event(\u0027activeport\u0027, id, \u0027create\u0027,"},{"line_number":797,"context_line":"                                   active_port_json, topic)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def update_active_port(self, id, topic, **columns):"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_5cf8f8e5","line":796,"range":{"start_line":796,"start_character":36,"end_line":796,"end_character":46},"updated":"2016-12-01 16:12:32.000000000","message":"Same here re: table name as constant value","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"c4681e5a1239c42fed8948d7fe693fa5cbbb971f","unresolved":false,"context_lines":[{"line_number":793,"context_line":"            active_port[col] \u003d val"},{"line_number":794,"context_line":"        active_port_json \u003d jsonutils.dumps(active_port)"},{"line_number":795,"context_line":"        self.driver.create_key(\u0027activeport\u0027, id, active_port_json, topic)"},{"line_number":796,"context_line":"        self._send_db_change_event(\u0027activeport\u0027, id, \u0027create\u0027,"},{"line_number":797,"context_line":"                                   active_port_json, topic)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def update_active_port(self, id, topic, **columns):"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_6aaa3572","line":796,"range":{"start_line":796,"start_character":36,"end_line":796,"end_character":46},"in_reply_to":"3a71b18c_5cf8f8e5","updated":"2016-12-08 10:04:11.000000000","message":"Done","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"}],"dragonflow/db/drivers/ovsdb_vswitch_impl.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                mac_in_use \u003d interface.mac_in_use"},{"line_number":279,"context_line":"                if isinstance(mac_in_use, list) and (len(mac_in_use) !\u003d 0):"},{"line_number":280,"context_line":"                    return mac_in_use[0]"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        return None"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"},{"line_number":285,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_28dfde3a","line":282,"range":{"start_line":281,"start_character":0,"end_line":282,"end_character":19},"updated":"2016-08-24 03:44:24.000000000","message":"This is actually not required.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                mac_in_use \u003d interface.mac_in_use"},{"line_number":279,"context_line":"                if isinstance(mac_in_use, list) and (len(mac_in_use) !\u003d 0):"},{"line_number":280,"context_line":"                    return mac_in_use[0]"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        return None"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"},{"line_number":285,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_f7be5bd3","line":282,"range":{"start_line":281,"start_character":0,"end_line":282,"end_character":19},"in_reply_to":"1ac06dbe_28dfde3a","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":277,"context_line":"            if (ifaceid \u003d\u003d port_id) and (interface.mac_in_use is not None):"},{"line_number":278,"context_line":"                mac_in_use \u003d interface.mac_in_use"},{"line_number":279,"context_line":"                if isinstance(mac_in_use, list) and (len(mac_in_use) !\u003d 0):"},{"line_number":280,"context_line":"                    return mac_in_use[0]"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_a2b689f6","line":279,"range":{"start_line":279,"start_character":16,"end_line":279,"end_character":75},"updated":"2016-09-08 09:33:24.000000000","message":"nit: just use \n\nif not mac_in_use:\n\nshould be fine","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":277,"context_line":"            if (ifaceid \u003d\u003d port_id) and (interface.mac_in_use is not None):"},{"line_number":278,"context_line":"                mac_in_use \u003d interface.mac_in_use"},{"line_number":279,"context_line":"                if isinstance(mac_in_use, list) and (len(mac_in_use) !\u003d 0):"},{"line_number":280,"context_line":"                    return mac_in_use[0]"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_256074ce","line":279,"range":{"start_line":279,"start_character":16,"end_line":279,"end_character":75},"in_reply_to":"9a89bdaa_a2b689f6","updated":"2016-09-14 09:12:50.000000000","message":"Done","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5ee76cde13550648e45b061ff01ddd92ba5cedce","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":273,"context_line":"            if (ifaceid \u003d\u003d port_id) and (interface.mac_in_use is not None):"},{"line_number":274,"context_line":"                mac_in_use \u003d interface.mac_in_use"},{"line_number":275,"context_line":"                if not mac_in_use:"},{"line_number":276,"context_line":"                    return mac_in_use[0]"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a8ec9b2_1f76f905","line":275,"range":{"start_line":275,"start_character":16,"end_line":275,"end_character":33},"updated":"2016-09-15 21:41:36.000000000","message":"I am sorry, I mislead you here. It should be \"if mac_in_use:\" here. It  is a small change, let me udpate it for you.","commit_id":"58d648acbd47e835ee42c115c144f691168f8a80"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"d0ad70cb9db6526057cdd249fd8269739ea825ff","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":273,"context_line":"            if (ifaceid \u003d\u003d port_id) and (interface.mac_in_use is not None):"},{"line_number":274,"context_line":"                mac_in_use \u003d interface.mac_in_use"},{"line_number":275,"context_line":"                if not mac_in_use:"},{"line_number":276,"context_line":"                    return mac_in_use[0]"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a8ec9b2_14f77359","line":275,"range":{"start_line":275,"start_character":16,"end_line":275,"end_character":33},"in_reply_to":"7a8ec9b2_1f76f905","updated":"2016-09-18 03:12:25.000000000","message":"ok, thanks. I have a little change here in the latest patch set, please have a look at.","commit_id":"58d648acbd47e835ee42c115c144f691168f8a80"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e51f80000a22c72952c18b86572cb2bf572f672f","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        for interface in interfaces:"},{"line_number":272,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":273,"context_line":"            if ifaceid \u003d\u003d port_id:"},{"line_number":274,"context_line":"                if interface.mac_in_use:"},{"line_number":275,"context_line":"                    return interface.mac_in_use[0]"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"},{"line_number":278,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_0a7f47e0","line":275,"range":{"start_line":274,"start_character":16,"end_line":275,"end_character":50},"updated":"2016-09-18 11:00:17.000000000","message":"If interface.mac_in_use is empty or None, the iteration will not interrupt here, which means the code will still iterate the left ports. This may be a waste.\n\nI think if the ifaceid matches, this method should return, no matter is the mac is found or not.","commit_id":"28fd86cdd70ddb5257806eec72b4f337911b3f72"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"d3464c8afb0ee2a935de62f0d324543b930d39d6","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        for interface in interfaces:"},{"line_number":272,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":273,"context_line":"            if ifaceid \u003d\u003d port_id:"},{"line_number":274,"context_line":"                if interface.mac_in_use:"},{"line_number":275,"context_line":"                    return interface.mac_in_use[0]"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"},{"line_number":278,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_800a4b24","line":275,"range":{"start_line":274,"start_character":16,"end_line":275,"end_character":50},"in_reply_to":"7a8ec9b2_0a7f47e0","updated":"2016-09-19 07:47:29.000000000","message":"ok","commit_id":"28fd86cdd70ddb5257806eec72b4f337911b3f72"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"cd914c5acdcdea79b39a4e4bbbb381f93b19d22d","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        interfaces \u003d self.idl.tables[\u0027Interface\u0027].rows.values()"},{"line_number":273,"context_line":"        mac_in_use \u003d None"},{"line_number":274,"context_line":"        for interface in interfaces:"},{"line_number":275,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":276,"context_line":"            if ifaceid \u003d\u003d port_id:"},{"line_number":277,"context_line":"                if interface.mac_in_use:"},{"line_number":278,"context_line":"                    mac_in_use \u003d interface.mac_in_use[0]"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8ec9b2_0f9b0319","line":275,"range":{"start_line":275,"start_character":12,"end_line":275,"end_character":19},"updated":"2016-09-22 02:49:19.000000000","message":"may be we could name it as if_id","commit_id":"10805fd2d56dc70c0787a708951e7604f7d51b83"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"052c05ea68b8b98bb4cba919985dbeafb5306083","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        interfaces \u003d self.idl.tables[\u0027Interface\u0027].rows.values()"},{"line_number":273,"context_line":"        mac_in_use \u003d None"},{"line_number":274,"context_line":"        for interface in interfaces:"},{"line_number":275,"context_line":"            ifaceid \u003d interface.external_ids.get(\u0027iface-id\u0027)"},{"line_number":276,"context_line":"            if ifaceid \u003d\u003d port_id:"},{"line_number":277,"context_line":"                if interface.mac_in_use:"},{"line_number":278,"context_line":"                    mac_in_use \u003d interface.mac_in_use[0]"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a95cdbc_ec75f7ca","line":275,"range":{"start_line":275,"start_character":12,"end_line":275,"end_character":19},"in_reply_to":"7a8ec9b2_0f9b0319","updated":"2016-10-08 11:11:20.000000000","message":"that name is in according with the old codes in line 265.","commit_id":"10805fd2d56dc70c0787a708951e7604f7d51b83"}],"dragonflow/neutron/ml2/mech_driver.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":535,"context_line":"                             \u0027mac_address\u0027: pair[\"mac_address\"]})"},{"line_number":536,"context_line":"            else:"},{"line_number":537,"context_line":"                supported_allowed_address_pairs.append(pair)"},{"line_number":538,"context_line":"        return supported_allowed_address_pairs"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_ML2_CORE)"},{"line_number":541,"context_line":"    def create_port_postcommit(self, context):"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_f410db50","line":538,"updated":"2016-11-15 22:04:52.000000000","message":"Doesn\u0027t this mean that a feature that was supported previously now isn\u0027t supported?","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":535,"context_line":"                             \u0027mac_address\u0027: pair[\"mac_address\"]})"},{"line_number":536,"context_line":"            else:"},{"line_number":537,"context_line":"                supported_allowed_address_pairs.append(pair)"},{"line_number":538,"context_line":"        return supported_allowed_address_pairs"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_ML2_CORE)"},{"line_number":541,"context_line":"    def create_port_postcommit(self, context):"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_d501d6b0","line":538,"in_reply_to":"7a77a97e_f410db50","updated":"2016-11-17 07:14:59.000000000","message":"I think we could only support single IP address in a allowed address pair as first step to implement allowed address pairs feature, because a IP prefix is difficult to detect. I don\u0027t think it is a recession, since in current users could configure a IP address or a IP prefix though, but it didn\u0027t actually works for now.","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":22060,"name":"jingting","email":"kangjingting@huawei.com","username":"jingting"},"change_message_id":"bdda56b4be18836ec03be98c1f755596ae436389","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        LOG.info(_LI(\"DFMechDriver: delete subnet %s\"), subnet_id)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def _filter_unsupported_allowed_address_pairs(self,"},{"line_number":521,"context_line":"                                                  allowed_address_pairs):"},{"line_number":522,"context_line":"        if not validators.is_attr_set(allowed_address_pairs):"},{"line_number":523,"context_line":"            return []"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        supported_allowed_address_pairs \u003d []"},{"line_number":526,"context_line":"        # Not support IP address prefix yet"},{"line_number":527,"context_line":"        for pair in allowed_address_pairs:"},{"line_number":528,"context_line":"            if \u0027/\u0027 in pair[\"ip_address\"]:"},{"line_number":529,"context_line":"                LOG.warning(_LW(\"Not support IP prefix in allowed address \""},{"line_number":530,"context_line":"                                \"pairs yet. This allowed address pair \""},{"line_number":531,"context_line":"                                \"(ip_address \u003d %(ip_address), \""},{"line_number":532,"context_line":"                                \"mac_address \u003d %(mac_address)) will be \""},{"line_number":533,"context_line":"                                \"ignored.} \"),"},{"line_number":534,"context_line":"                            {\u0027ip_address\u0027: pair[\"ip_address\"],"},{"line_number":535,"context_line":"                             \u0027mac_address\u0027: pair[\"mac_address\"]})"},{"line_number":536,"context_line":"            else:"},{"line_number":537,"context_line":"                supported_allowed_address_pairs.append(pair)"},{"line_number":538,"context_line":"        return supported_allowed_address_pairs"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_ML2_CORE)"},{"line_number":541,"context_line":"    def create_port_postcommit(self, context):"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a77a97e_633488fb","line":538,"range":{"start_line":520,"start_character":0,"end_line":538,"end_character":46},"updated":"2016-11-18 09:52:17.000000000","message":"shoud return error if cidr occurs, otherwise there will be inconsistent between Neutron DB and DF DB, you could raise exception so that neutron can catch it","commit_id":"0a59f11d6b88856c24e51fa10ec925109c0e579a"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"89faf9ea246449efbf9569a8d58fde310bc6650a","unresolved":false,"context_lines":[{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        LOG.info(_LI(\"DFMechDriver: delete subnet %s\"), subnet_id)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def _filter_unsupported_allowed_address_pairs(self,"},{"line_number":521,"context_line":"                                                  allowed_address_pairs):"},{"line_number":522,"context_line":"        if not validators.is_attr_set(allowed_address_pairs):"},{"line_number":523,"context_line":"            return []"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        supported_allowed_address_pairs \u003d []"},{"line_number":526,"context_line":"        # Not support IP address prefix yet"},{"line_number":527,"context_line":"        for pair in allowed_address_pairs:"},{"line_number":528,"context_line":"            if \u0027/\u0027 in pair[\"ip_address\"]:"},{"line_number":529,"context_line":"                LOG.warning(_LW(\"Not support IP prefix in allowed address \""},{"line_number":530,"context_line":"                                \"pairs yet. This allowed address pair \""},{"line_number":531,"context_line":"                                \"(ip_address \u003d %(ip_address), \""},{"line_number":532,"context_line":"                                \"mac_address \u003d %(mac_address)) will be \""},{"line_number":533,"context_line":"                                \"ignored.} \"),"},{"line_number":534,"context_line":"                            {\u0027ip_address\u0027: pair[\"ip_address\"],"},{"line_number":535,"context_line":"                             \u0027mac_address\u0027: pair[\"mac_address\"]})"},{"line_number":536,"context_line":"            else:"},{"line_number":537,"context_line":"                supported_allowed_address_pairs.append(pair)"},{"line_number":538,"context_line":"        return supported_allowed_address_pairs"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_ML2_CORE)"},{"line_number":541,"context_line":"    def create_port_postcommit(self, context):"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a77a97e_0c058e44","line":538,"range":{"start_line":520,"start_character":0,"end_line":538,"end_character":46},"in_reply_to":"7a77a97e_633488fb","updated":"2016-11-21 02:58:04.000000000","message":"Done","commit_id":"0a59f11d6b88856c24e51fa10ec925109c0e579a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"373fdd815a6084e5163dda758ddff2339c6dd2c9","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                                  \"caused this exception.} \"),"},{"line_number":517,"context_line":"                                {\u0027ip_address\u0027: pair[\"ip_address\"],"},{"line_number":518,"context_line":"                                 \u0027mac_address\u0027: pair[\"mac_address\"]})"},{"line_number":519,"context_line":"            else:"},{"line_number":520,"context_line":"                supported_allowed_address_pairs.append(pair)"},{"line_number":521,"context_line":"        return supported_allowed_address_pairs"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_ML2_CORE)"},{"line_number":524,"context_line":"    def create_port_postcommit(self, context):"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_e1903fef","line":521,"range":{"start_line":519,"start_character":0,"end_line":521,"end_character":46},"updated":"2016-12-01 16:12:32.000000000","message":"nit: Instead of the else clause, you could just return a copy of the list. You raise an exception if there are differences anyway.","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"c4681e5a1239c42fed8948d7fe693fa5cbbb971f","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                                  \"caused this exception.} \"),"},{"line_number":517,"context_line":"                                {\u0027ip_address\u0027: pair[\"ip_address\"],"},{"line_number":518,"context_line":"                                 \u0027mac_address\u0027: pair[\"mac_address\"]})"},{"line_number":519,"context_line":"            else:"},{"line_number":520,"context_line":"                supported_allowed_address_pairs.append(pair)"},{"line_number":521,"context_line":"        return supported_allowed_address_pairs"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_ML2_CORE)"},{"line_number":524,"context_line":"    def create_port_postcommit(self, context):"}],"source_content_type":"text/x-python","patch_set":54,"id":"3a71b18c_aa936d4e","line":521,"range":{"start_line":519,"start_character":0,"end_line":521,"end_character":46},"in_reply_to":"3a71b18c_e1903fef","updated":"2016-12-08 10:04:11.000000000","message":"Done","commit_id":"2c08fec3cce411713cefd76a6aa9f7c9856134bb"}],"dragonflow/neutron/plugin.py":[{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                                   version\u003dnetwork_version)"},{"line_number":504,"context_line":"        return result"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def _check_allowed_address_pairs(self, allowed_address_pairs):"},{"line_number":507,"context_line":"        if not attr.is_attr_set(allowed_address_pairs):"},{"line_number":508,"context_line":"            return True"},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_9aac468d","line":506,"range":{"start_line":506,"start_character":0,"end_line":506,"end_character":66},"updated":"2016-08-25 01:41:11.000000000","message":"why does not mech_driver for ML2 need this?","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def _check_allowed_address_pairs(self, allowed_address_pairs):"},{"line_number":507,"context_line":"        if not attr.is_attr_set(allowed_address_pairs):"},{"line_number":508,"context_line":"            return True"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        # Not support IP address prefix yet"},{"line_number":511,"context_line":"        for pair in allowed_address_pairs:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_c84d6ac5","line":508,"range":{"start_line":508,"start_character":12,"end_line":508,"end_character":23},"updated":"2016-08-24 03:44:24.000000000","message":"Why this will be True, if the attribute is not set?","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def _check_allowed_address_pairs(self, allowed_address_pairs):"},{"line_number":507,"context_line":"        if not attr.is_attr_set(allowed_address_pairs):"},{"line_number":508,"context_line":"            return True"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        # Not support IP address prefix yet"},{"line_number":511,"context_line":"        for pair in allowed_address_pairs:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_f7a57bb5","line":508,"range":{"start_line":508,"start_character":12,"end_line":508,"end_character":23},"in_reply_to":"1ac06dbe_c84d6ac5","updated":"2016-09-05 13:26:50.000000000","message":"this method only check if allowed address pairs configured a cidr, because it is not supported for the current implement of DF.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":554,"context_line":"                    address_pairs_updated \u003d self.update_address_pairs_on_port("},{"line_number":555,"context_line":"                        context, id, port, original_port, updated_port)"},{"line_number":556,"context_line":"                else:"},{"line_number":557,"context_line":"                    LOG.info(_LI(\"Not support ip prefix in \""},{"line_number":558,"context_line":"                                 \"allowed-address-pairs yet\"))"},{"line_number":559,"context_line":"            if not address_pairs_updated:"},{"line_number":560,"context_line":"                updated_port[addr_pair.ADDRESS_PAIRS] \u003d original_port.get("}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_88d412ec","line":557,"range":{"start_line":557,"start_character":29,"end_line":557,"end_character":32},"updated":"2016-08-24 03:44:24.000000000","message":"Might be better to change it to warning, so that user knows what is going wrong.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":554,"context_line":"                    address_pairs_updated \u003d self.update_address_pairs_on_port("},{"line_number":555,"context_line":"                        context, id, port, original_port, updated_port)"},{"line_number":556,"context_line":"                else:"},{"line_number":557,"context_line":"                    LOG.info(_LI(\"Not support ip prefix in \""},{"line_number":558,"context_line":"                                 \"allowed-address-pairs yet\"))"},{"line_number":559,"context_line":"            if not address_pairs_updated:"},{"line_number":560,"context_line":"                updated_port[addr_pair.ADDRESS_PAIRS] \u003d original_port.get("}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_37b0c3f4","line":557,"range":{"start_line":557,"start_character":29,"end_line":557,"end_character":32},"in_reply_to":"1ac06dbe_88d412ec","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":703,"context_line":"                        context, db_port,"},{"line_number":704,"context_line":"                        port[\u0027port\u0027].get(addr_pair.ADDRESS_PAIRS)))"},{"line_number":705,"context_line":"            else:"},{"line_number":706,"context_line":"                LOG.info(_LI(\"Not support ip prefix in \""},{"line_number":707,"context_line":"                             \"allowed-address-pairs yet\"))"},{"line_number":708,"context_line":"            self._process_port_create_extra_dhcp_opts(context, db_port,"},{"line_number":709,"context_line":"                                                      dhcp_opts)"},{"line_number":710,"context_line":"            port_version \u003d version_db._create_db_version_row("}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_a843cead","line":707,"range":{"start_line":706,"start_character":16,"end_line":707,"end_character":58},"updated":"2016-08-24 03:44:24.000000000","message":"Since it is duplicated, it will be better to move this log into _check_allowed_address_pairs.","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b484caf36042ba0459acb85cf30985b8c64b2fbc","unresolved":false,"context_lines":[{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    def _filter_unsupported_allowed_address_pairs(self,"},{"line_number":508,"context_line":"                                                  allowed_address_pairs):"},{"line_number":509,"context_line":"        if not attr.is_attr_set(allowed_address_pairs):"},{"line_number":510,"context_line":"            return allowed_address_pairs"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"        supported_allowed_address_pairs \u003d []"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a629dbe_d533fdf4","line":509,"range":{"start_line":509,"start_character":15,"end_line":509,"end_character":19},"updated":"2016-11-14 12:02:56.000000000","message":"pls use validators.is_attr_set(allowed_address_pairs) here.","commit_id":"53bffe11076542ed4e02cd505cafc592ae48a84c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a345e5ddd28fead58f757069de6bf7923a8e1fbe","unresolved":false,"context_lines":[{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    def _filter_unsupported_allowed_address_pairs(self,"},{"line_number":508,"context_line":"                                                  allowed_address_pairs):"},{"line_number":509,"context_line":"        if not attr.is_attr_set(allowed_address_pairs):"},{"line_number":510,"context_line":"            return allowed_address_pairs"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"        supported_allowed_address_pairs \u003d []"}],"source_content_type":"text/x-python","patch_set":36,"id":"7a77a97e_62519b62","line":509,"range":{"start_line":509,"start_character":15,"end_line":509,"end_character":19},"in_reply_to":"9a629dbe_d533fdf4","updated":"2016-11-15 01:52:07.000000000","message":"Done","commit_id":"53bffe11076542ed4e02cd505cafc592ae48a84c"}],"dragonflow/ovsdb/vswitch_impl.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"625744dc357790521179989545fb027a00ec7b19","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        ifaces \u003d self.ovsdb.db_find("},{"line_number":146,"context_line":"            \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),"},{"line_number":147,"context_line":"            columns\u003d[\u0027external_ids\u0027, \u0027name\u0027, \u0027ofport\u0027,"},{"line_number":148,"context_line":"                     \u0027mac_in_use\u0027]).execute()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        for iface in ifaces:"},{"line_number":151,"context_line":"            if (self.integration_bridge !\u003d"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_bd3d60bd","line":148,"range":{"start_line":148,"start_character":0,"end_line":148,"end_character":34},"updated":"2016-10-12 09:48:32.000000000","message":"I think it is not the right way to use the code. I don\u0027t expect this column will grow, or else, I will add all columns when I did the refactor. See my comment below.","commit_id":"bef56200b6cd407f989e0aacbebc69029b3662f7"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"2af378edc101e8ebee74b9dbfa389c3d95f320f2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        ifaces \u003d self.ovsdb.db_find("},{"line_number":146,"context_line":"            \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),"},{"line_number":147,"context_line":"            columns\u003d[\u0027external_ids\u0027, \u0027name\u0027, \u0027ofport\u0027,"},{"line_number":148,"context_line":"                     \u0027mac_in_use\u0027]).execute()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        for iface in ifaces:"},{"line_number":151,"context_line":"            if (self.integration_bridge !\u003d"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_7063eadc","line":148,"range":{"start_line":148,"start_character":0,"end_line":148,"end_character":34},"in_reply_to":"fa6399be_6e022c71","updated":"2016-10-12 11:26:18.000000000","message":"Yeah, just adding columns that each method needed looks good. Don\u0027t use one method to return all data that is required by all other methods.","commit_id":"bef56200b6cd407f989e0aacbebc69029b3662f7"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"4d12eec488b2e91103949aa293750393a80768ba","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        ifaces \u003d self.ovsdb.db_find("},{"line_number":146,"context_line":"            \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),"},{"line_number":147,"context_line":"            columns\u003d[\u0027external_ids\u0027, \u0027name\u0027, \u0027ofport\u0027,"},{"line_number":148,"context_line":"                     \u0027mac_in_use\u0027]).execute()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        for iface in ifaces:"},{"line_number":151,"context_line":"            if (self.integration_bridge !\u003d"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_6e022c71","line":148,"range":{"start_line":148,"start_character":0,"end_line":148,"end_character":34},"in_reply_to":"fa6399be_bd3d60bd","updated":"2016-10-12 11:12:32.000000000","message":"I admit that is not a good way to reuse codes, but I think adding all columns may also be a waste of resource. Maybe only to get those columns chose by the caller will be a good idea.","commit_id":"bef56200b6cd407f989e0aacbebc69029b3662f7"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"625744dc357790521179989545fb027a00ec7b19","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        if iface and self._check_ofport(iface[\u0027name\u0027], iface[\u0027ofport\u0027]):"},{"line_number":161,"context_line":"            return iface[\u0027ofport\u0027]"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def get_local_port_mac_in_use(self, port_id):"},{"line_number":164,"context_line":"        iface \u003d self._get_port_by_id(port_id)"},{"line_number":165,"context_line":"        if iface and self._check_mac_in_use("},{"line_number":166,"context_line":"                iface[\u0027name\u0027], iface[\u0027mac_in_use\u0027]):"},{"line_number":167,"context_line":"            return iface[\u0027mac_in_use\u0027]"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"},{"line_number":170,"context_line":"        self.ovsdb.add_br(bridge, datapath_type\u003d\u0027system\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa6399be_3d51500f","line":167,"range":{"start_line":163,"start_character":0,"end_line":167,"end_character":38},"updated":"2016-10-12 09:48:32.000000000","message":"This is not the way the ovsdb.db_find should be used. You might want to try something like this\n\n\nifaces \u003d self.ovsdb.db_find(\n    \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),\n            columns\u003d[\u0027external_ids\u0027, \u0027name\u0027, \u0027mac_in_use\u0027]).execute()\n    for iface in ifaces:\n        if (self.integration_bridge !\u003d\n                self._get_bridge_for_iface(iface[\u0027name\u0027])):\n            # iface-id is the port id in neutron, the same neutron port\n            # might create multiple interfaces in different bridges\n            continue\n        if self._check_mac_in_use(iface[\u0027name\u0027], iface[\u0027mac_in_use\u0027]):\n            return iface[\u0027mac_in_use\u0027]","commit_id":"bef56200b6cd407f989e0aacbebc69029b3662f7"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"130c2c18a7f5403402815c8d7791a9d160a62801","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _get_port_by_id_with_only_specified_columns(self, port_id,"},{"line_number":145,"context_line":"                                                    specified_columns):"},{"line_number":146,"context_line":"        columns \u003d {\u0027external_ids\u0027, \u0027name\u0027}"},{"line_number":147,"context_line":"        columns.update(specified_columns)"},{"line_number":148,"context_line":"        ifaces \u003d self.ovsdb.db_find("},{"line_number":149,"context_line":"            \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_72ed8e24","line":146,"range":{"start_line":146,"start_character":17,"end_line":146,"end_character":42},"updated":"2016-10-13 00:14:35.000000000","message":"You may want to use a list here, as specified_columns will be a list.","commit_id":"8547c4e3caccb9afc0038dd91e49838a8f4db1ed"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"1c1d59b211ee4fd7d7f8f1c92a2cf96c6b57f649","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _get_port_by_id_with_only_specified_columns(self, port_id,"},{"line_number":145,"context_line":"                                                    specified_columns):"},{"line_number":146,"context_line":"        columns \u003d {\u0027external_ids\u0027, \u0027name\u0027}"},{"line_number":147,"context_line":"        columns.update(specified_columns)"},{"line_number":148,"context_line":"        ifaces \u003d self.ovsdb.db_find("},{"line_number":149,"context_line":"            \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_c014c045","line":146,"range":{"start_line":146,"start_character":17,"end_line":146,"end_character":42},"in_reply_to":"fa6399be_72ed8e24","updated":"2016-10-13 01:54:19.000000000","message":"please see comment below first;)","commit_id":"8547c4e3caccb9afc0038dd91e49838a8f4db1ed"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"130c2c18a7f5403402815c8d7791a9d160a62801","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_port_ofport_by_id(self, port_id):"},{"line_number":161,"context_line":"        iface \u003d self._get_port_by_id_with_only_specified_columns("},{"line_number":162,"context_line":"            port_id, [\u0027name\u0027, \u0027ofport\u0027])"},{"line_number":163,"context_line":"        if iface and self._check_ofport(iface[\u0027name\u0027], iface[\u0027ofport\u0027]):"},{"line_number":164,"context_line":"            return iface[\u0027ofport\u0027]"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_12e9b214","line":162,"range":{"start_line":162,"start_character":23,"end_line":162,"end_character":27},"updated":"2016-10-13 00:14:35.000000000","message":"This is not required as it is already in _get_port_by_id_with_only_specified_columns","commit_id":"8547c4e3caccb9afc0038dd91e49838a8f4db1ed"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"1c1d59b211ee4fd7d7f8f1c92a2cf96c6b57f649","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_port_ofport_by_id(self, port_id):"},{"line_number":161,"context_line":"        iface \u003d self._get_port_by_id_with_only_specified_columns("},{"line_number":162,"context_line":"            port_id, [\u0027name\u0027, \u0027ofport\u0027])"},{"line_number":163,"context_line":"        if iface and self._check_ofport(iface[\u0027name\u0027], iface[\u0027ofport\u0027]):"},{"line_number":164,"context_line":"            return iface[\u0027ofport\u0027]"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_d50d643f","line":162,"range":{"start_line":162,"start_character":23,"end_line":162,"end_character":27},"in_reply_to":"fa6399be_12e9b214","updated":"2016-10-13 01:54:19.000000000","message":"I want to make the caller decoupled with the called method, so the caller doesn\u0027t need to care whether \u0027name\u0027 column will be returned if it hasn\u0027t been specified, but just specified what columns needed by it.","commit_id":"8547c4e3caccb9afc0038dd91e49838a8f4db1ed"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"130c2c18a7f5403402815c8d7791a9d160a62801","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def get_local_port_mac_in_use(self, port_id):"},{"line_number":167,"context_line":"        iface \u003d self._get_port_by_id_with_only_specified_columns("},{"line_number":168,"context_line":"            port_id, [\u0027name\u0027, \u0027mac_in_use\u0027])"},{"line_number":169,"context_line":"        if iface and self._check_mac_in_use("},{"line_number":170,"context_line":"                iface[\u0027name\u0027], iface[\u0027mac_in_use\u0027]):"},{"line_number":171,"context_line":"            return iface[\u0027mac_in_use\u0027]"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa6399be_32e4f639","line":168,"range":{"start_line":168,"start_character":23,"end_line":168,"end_character":27},"updated":"2016-10-13 00:14:35.000000000","message":"ditto","commit_id":"8547c4e3caccb9afc0038dd91e49838a8f4db1ed"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d7669a484ac2eee75a13509af42cdce60ac33a12","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def get_port_ofport_by_id(self, port_id):"},{"line_number":166,"context_line":"        iface \u003d self._get_port_by_id_with_only_specified_columns("},{"line_number":167,"context_line":"            port_id, [\u0027name\u0027, \u0027ofport\u0027])"},{"line_number":168,"context_line":"        if iface and self._check_ofport(iface[\u0027name\u0027], iface[\u0027ofport\u0027]):"},{"line_number":169,"context_line":"            return iface[\u0027ofport\u0027]"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_16551f1c","line":167,"range":{"start_line":167,"start_character":21,"end_line":167,"end_character":39},"updated":"2016-10-13 06:33:30.000000000","message":"Continue your comment at PS 27...  Then you should use a set here too, to keep consistent.","commit_id":"4e5a1fa0a0d1da6d0af48593f55ec63229fb308a"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"e34d95282a195e4a4cb015d71a3d4abadd30e7d3","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def get_port_ofport_by_id(self, port_id):"},{"line_number":166,"context_line":"        iface \u003d self._get_port_by_id_with_only_specified_columns("},{"line_number":167,"context_line":"            port_id, [\u0027name\u0027, \u0027ofport\u0027])"},{"line_number":168,"context_line":"        if iface and self._check_ofport(iface[\u0027name\u0027], iface[\u0027ofport\u0027]):"},{"line_number":169,"context_line":"            return iface[\u0027ofport\u0027]"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_acd262fe","line":167,"range":{"start_line":167,"start_character":21,"end_line":167,"end_character":39},"in_reply_to":"fa6399be_16551f1c","updated":"2016-10-13 07:30:02.000000000","message":"Done","commit_id":"4e5a1fa0a0d1da6d0af48593f55ec63229fb308a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d7669a484ac2eee75a13509af42cdce60ac33a12","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def get_local_port_mac_in_use(self, port_id):"},{"line_number":172,"context_line":"        iface \u003d self._get_port_by_id_with_only_specified_columns("},{"line_number":173,"context_line":"            port_id, [\u0027name\u0027, \u0027mac_in_use\u0027])"},{"line_number":174,"context_line":"        if iface and self._check_mac_in_use("},{"line_number":175,"context_line":"                iface[\u0027name\u0027], iface[\u0027mac_in_use\u0027]):"},{"line_number":176,"context_line":"            return iface[\u0027mac_in_use\u0027]"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_36322311","line":173,"range":{"start_line":173,"start_character":21,"end_line":173,"end_character":43},"updated":"2016-10-13 06:33:30.000000000","message":"ditto","commit_id":"4e5a1fa0a0d1da6d0af48593f55ec63229fb308a"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"e34d95282a195e4a4cb015d71a3d4abadd30e7d3","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def get_local_port_mac_in_use(self, port_id):"},{"line_number":172,"context_line":"        iface \u003d self._get_port_by_id_with_only_specified_columns("},{"line_number":173,"context_line":"            port_id, [\u0027name\u0027, \u0027mac_in_use\u0027])"},{"line_number":174,"context_line":"        if iface and self._check_mac_in_use("},{"line_number":175,"context_line":"                iface[\u0027name\u0027], iface[\u0027mac_in_use\u0027]):"},{"line_number":176,"context_line":"            return iface[\u0027mac_in_use\u0027]"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_cccdd65e","line":173,"range":{"start_line":173,"start_character":21,"end_line":173,"end_character":43},"in_reply_to":"fa6399be_36322311","updated":"2016-10-13 07:30:02.000000000","message":"Done","commit_id":"4e5a1fa0a0d1da6d0af48593f55ec63229fb308a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        return True"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @staticmethod"},{"line_number":122,"context_line":"    def _check_mac_in_use(port_name, mac_in_use):"},{"line_number":123,"context_line":"        if mac_in_use is None:"},{"line_number":124,"context_line":"            LOG.warning(_LW(\"Can\u0027t find mac_in_use for port %s.\"), port_name)"},{"line_number":125,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_54d0af53","line":122,"updated":"2016-11-15 22:04:52.000000000","message":"This method seems like a wrapper to netaddr.valid_mac. What\u0027s its added value?","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        return True"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @staticmethod"},{"line_number":122,"context_line":"    def _check_mac_in_use(port_name, mac_in_use):"},{"line_number":123,"context_line":"        if mac_in_use is None:"},{"line_number":124,"context_line":"            LOG.warning(_LW(\"Can\u0027t find mac_in_use for port %s.\"), port_name)"},{"line_number":125,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_90d4c9bd","line":122,"in_reply_to":"7a77a97e_54d0af53","updated":"2016-11-17 07:14:59.000000000","message":"good point, I will remove this method:)","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            LOG.warning(_LW(\"Can\u0027t find mac_in_use for port %s.\"), port_name)"},{"line_number":125,"context_line":"            return False"},{"line_number":126,"context_line":"        try:"},{"line_number":127,"context_line":"            valid_mac \u003d netaddr.valid_mac(mac_in_use)"},{"line_number":128,"context_line":"        except Exception:"},{"line_number":129,"context_line":"            valid_mac \u003d False"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_f4653be1","line":127,"updated":"2016-11-15 22:04:52.000000000","message":"The docs don\u0027t mention this method throws an exception. What exception are you expecting?","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            LOG.warning(_LW(\"Can\u0027t find mac_in_use for port %s.\"), port_name)"},{"line_number":125,"context_line":"            return False"},{"line_number":126,"context_line":"        try:"},{"line_number":127,"context_line":"            valid_mac \u003d netaddr.valid_mac(mac_in_use)"},{"line_number":128,"context_line":"        except Exception:"},{"line_number":129,"context_line":"            valid_mac \u003d False"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_b0dd45e2","line":127,"in_reply_to":"7a77a97e_f4653be1","updated":"2016-11-17 07:14:59.000000000","message":"Done","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"}],"dragonflow/tests/common/utils.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5db259ee908458e451e87985a90591103b5873e9","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                temp_vm_id \u003d external_ids.get(\u0027vm-id\u0027, None)"},{"line_number":169,"context_line":"                if temp_vm_id \u003d\u003d vm_id:"},{"line_number":170,"context_line":"                    return external_ids.get(\u0027iface-id\u0027, None)"},{"line_number":171,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_e8cca636","line":171,"range":{"start_line":171,"start_character":0,"end_line":171,"end_character":19},"updated":"2016-08-24 03:44:24.000000000","message":"nit: this is actually not required","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                temp_vm_id \u003d external_ids.get(\u0027vm-id\u0027, None)"},{"line_number":169,"context_line":"                if temp_vm_id \u003d\u003d vm_id:"},{"line_number":170,"context_line":"                    return external_ids.get(\u0027iface-id\u0027, None)"},{"line_number":171,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_a2870a60","line":171,"range":{"start_line":171,"start_character":0,"end_line":171,"end_character":19},"in_reply_to":"1ac06dbe_e8cca636","updated":"2016-09-05 13:26:50.000000000","message":"Done","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"27a46a1a5b65b498259650f9ed189976d699d941","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def get_port_id_by_vm_id(self, vm_id):"},{"line_number":164,"context_line":"        interfaces \u003d self.list_interfaces()"},{"line_number":165,"context_line":"        for item in interfaces:"},{"line_number":166,"context_line":"            external_ids \u003d item.get(\u0027external_ids\u0027, None)"},{"line_number":167,"context_line":"            if external_ids is not None:"},{"line_number":168,"context_line":"                temp_vm_id \u003d external_ids.get(\u0027vm-id\u0027, None)"},{"line_number":169,"context_line":"                if temp_vm_id \u003d\u003d vm_id:"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a89bdaa_a2e929b9","line":166,"range":{"start_line":166,"start_character":32,"end_line":166,"end_character":57},"updated":"2016-09-08 09:33:24.000000000","message":"nit: get will return None, by default.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"3c62ca5bff670722ca844955ebbdd432b00136b5","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def get_port_id_by_vm_id(self, vm_id):"},{"line_number":164,"context_line":"        interfaces \u003d self.list_interfaces()"},{"line_number":165,"context_line":"        for item in interfaces:"},{"line_number":166,"context_line":"            external_ids \u003d item.get(\u0027external_ids\u0027, None)"},{"line_number":167,"context_line":"            if external_ids is not None:"},{"line_number":168,"context_line":"                temp_vm_id \u003d external_ids.get(\u0027vm-id\u0027, None)"},{"line_number":169,"context_line":"                if temp_vm_id \u003d\u003d vm_id:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8ec9b2_65d51c42","line":166,"range":{"start_line":166,"start_character":32,"end_line":166,"end_character":57},"in_reply_to":"9a89bdaa_a2e929b9","updated":"2016-09-14 09:12:50.000000000","message":"this is in according with others, don\u0027t suggest to modify alone.","commit_id":"34151c23315e6ba0a9d7a6a74370e93c371ea85f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                    return item.get(\u0027ofport\u0027, None)"},{"line_number":174,"context_line":"        return None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def get_port_id_by_vm_id(self, vm_id):"},{"line_number":177,"context_line":"        interfaces \u003d self.list_interfaces()"},{"line_number":178,"context_line":"        for item in interfaces:"},{"line_number":179,"context_line":"            external_ids \u003d item.get(\u0027external_ids\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_545eefe9","line":176,"updated":"2016-11-15 22:04:52.000000000","message":"Can\u0027t this be done directly via Idl?","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                    return item.get(\u0027ofport\u0027, None)"},{"line_number":174,"context_line":"        return None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def get_port_id_by_vm_id(self, vm_id):"},{"line_number":177,"context_line":"        interfaces \u003d self.list_interfaces()"},{"line_number":178,"context_line":"        for item in interfaces:"},{"line_number":179,"context_line":"            external_ids \u003d item.get(\u0027external_ids\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_d54716ba","line":176,"in_reply_to":"7a77a97e_545eefe9","updated":"2016-11-17 07:14:59.000000000","message":"Yes, using ovsdb Idl is a good idea, but I think we could add a extra patch to use Idl to instead of all methods in this OvsDBParser class.","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"87a362dbb9b9fc9ebe465e1ddf7d247f783fca0d","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                    return item.get(\u0027ofport\u0027, None)"},{"line_number":174,"context_line":"        return None"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def get_port_id_by_vm_id(self, vm_id):"},{"line_number":177,"context_line":"        interfaces \u003d self.list_interfaces()"},{"line_number":178,"context_line":"        for item in interfaces:"},{"line_number":179,"context_line":"            external_ids \u003d item.get(\u0027external_ids\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"7a77a97e_f7716c77","line":176,"in_reply_to":"7a77a97e_d54716ba","updated":"2016-11-17 09:51:44.000000000","message":"All right.\n\nLooking forwards to that patch :)","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"}],"dragonflow/tests/fullstack/test_allowed_address_pairs_flows.py":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"a97566a8ca827b350698f8aa6db1776d5013fd6c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            of_port, ip_address2)\r"},{"line_number":146,"context_line":"        self.assertTrue(result)\r"},{"line_number":147,"context_line":"\r"},{"line_number":148,"context_line":"        vm.server.stop()\r"},{"line_number":149,"context_line":"        vm.close()\r"},{"line_number":150,"context_line":"\r"},{"line_number":151,"context_line":"        time.sleep(3)\r"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ac06dbe_0948b686","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":24},"updated":"2016-08-22 08:34:07.000000000","message":"https://review.openstack.org/#/c/357660/","commit_id":"f0f8dde2916f7dc298b5ee8d76a48845bc8a53c1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"0cd9b53718d81c8e55c842d0daceb655092bc972","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            of_port, ip_address2)\r"},{"line_number":146,"context_line":"        self.assertTrue(result)\r"},{"line_number":147,"context_line":"\r"},{"line_number":148,"context_line":"        vm.server.stop()\r"},{"line_number":149,"context_line":"        vm.close()\r"},{"line_number":150,"context_line":"\r"},{"line_number":151,"context_line":"        time.sleep(3)\r"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ac06dbe_df5e4ce8","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":24},"in_reply_to":"1ac06dbe_0948b686","updated":"2016-08-22 08:54:29.000000000","message":"ok","commit_id":"f0f8dde2916f7dc298b5ee8d76a48845bc8a53c1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"6988842ae24acd8c081ec272b2822e714e829642","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        flows is there.\r"},{"line_number":79,"context_line":"        \"\"\"\r"},{"line_number":80,"context_line":"        network \u003d self.store(objects.NetworkTestObj(self.neutron, self.nb_api))\r"},{"line_number":81,"context_line":"        network_id \u003d network.create(network\u003d{\u0027name\u0027: \u0027aap_test\u0027})\r"},{"line_number":82,"context_line":"        subnet_obj \u003d self.store(objects.SubnetTestObj(\r"},{"line_number":83,"context_line":"            self.neutron,\r"},{"line_number":84,"context_line":"            self.nb_api,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_1d569005","line":81,"range":{"start_line":81,"start_character":54,"end_line":81,"end_character":62},"updated":"2016-08-25 01:41:11.000000000","message":"a typo?","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"a3cecb3d814bbd71128c5c0039a2b2098e559243","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        flows is there.\r"},{"line_number":79,"context_line":"        \"\"\"\r"},{"line_number":80,"context_line":"        network \u003d self.store(objects.NetworkTestObj(self.neutron, self.nb_api))\r"},{"line_number":81,"context_line":"        network_id \u003d network.create(network\u003d{\u0027name\u0027: \u0027aap_test\u0027})\r"},{"line_number":82,"context_line":"        subnet_obj \u003d self.store(objects.SubnetTestObj(\r"},{"line_number":83,"context_line":"            self.neutron,\r"},{"line_number":84,"context_line":"            self.nb_api,\r"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a89bdaa_c2416e0d","line":81,"range":{"start_line":81,"start_character":54,"end_line":81,"end_character":62},"in_reply_to":"1ac06dbe_1d569005","updated":"2016-09-05 13:26:50.000000000","message":"Allowed address pairs  -\u003e aap","commit_id":"39e52178a6762c9942aebcd40e908e263432e5bf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"1ff9cf93fb48e5a8571a1697fc7dac7ef1aae03e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        vm_id \u003d vm.create(network\u003dnetwork)\r"},{"line_number":98,"context_line":"\r"},{"line_number":99,"context_line":"        ovsdb \u003d utils.OvsDBParser()\r"},{"line_number":100,"context_line":"        vm_port_id \u003d ovsdb.get_port_id_by_vm_id(vm_id)\r"},{"line_number":101,"context_line":"        self.assertIsNotNone(vm_port_id)\r"},{"line_number":102,"context_line":"\r"},{"line_number":103,"context_line":"        vm_port \u003d objects.PortTestObj(self.neutron, self.nb_api, network_id,\r"},{"line_number":104,"context_line":"                                      vm_port_id)\r"},{"line_number":105,"context_line":"\r"},{"line_number":106,"context_line":"        of_port \u003d ovsdb.get_ofport(vm_port_id)\r"},{"line_number":107,"context_line":"        self.assertIsNotNone(of_port)\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_057186a8","line":104,"range":{"start_line":100,"start_character":8,"end_line":104,"end_character":49},"updated":"2016-10-19 09:21:31.000000000","message":"why not get the port_id by using vm_port.port_id directly instead of get it by vm_id?","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"14d52327a6d2fa83d8bbd58b44e132054fa68527","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        vm_id \u003d vm.create(network\u003dnetwork)\r"},{"line_number":98,"context_line":"\r"},{"line_number":99,"context_line":"        ovsdb \u003d utils.OvsDBParser()\r"},{"line_number":100,"context_line":"        vm_port_id \u003d ovsdb.get_port_id_by_vm_id(vm_id)\r"},{"line_number":101,"context_line":"        self.assertIsNotNone(vm_port_id)\r"},{"line_number":102,"context_line":"\r"},{"line_number":103,"context_line":"        vm_port \u003d objects.PortTestObj(self.neutron, self.nb_api, network_id,\r"},{"line_number":104,"context_line":"                                      vm_port_id)\r"},{"line_number":105,"context_line":"\r"},{"line_number":106,"context_line":"        of_port \u003d ovsdb.get_ofport(vm_port_id)\r"},{"line_number":107,"context_line":"        self.assertIsNotNone(of_port)\r"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa6399be_5d3b32eb","line":104,"range":{"start_line":100,"start_character":8,"end_line":104,"end_character":49},"in_reply_to":"fa6399be_057186a8","updated":"2016-10-20 04:02:03.000000000","message":"Calling vm.create() will only return vm_id, and I got vm_port by vm_port_id. How I can get vm_port_id directly by vm_id?","commit_id":"23c8aa4beeb33989bd05046818334b9dfb3780d1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"ebade2065104e0b91c209a440aba95bd40742ff0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"7a77a97e_d4203f4c","line":160,"updated":"2016-11-15 22:04:52.000000000","message":"Could you please also add a fullstack test that verifies the behaviour is correct, and not only that the flows are installed?\n\ne.g. creating 3 VMs (1 client, 2 servers) where the 2 servers have the same allowed address pair, and show how when one server is active, the packets reach only it, and when that server becomes silent and the second server is active, the packets reach only the second server?","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"87a362dbb9b9fc9ebe465e1ddf7d247f783fca0d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"7a77a97e_97a91893","line":160,"in_reply_to":"7a77a97e_75b9e278","updated":"2016-11-17 09:51:44.000000000","message":"In the meantime, what about a fullstack test just that the application\u0027s database (or the NB database) is updated correctly? I have found that these flow-based tests are not as effective, either because they are too fragile (the flows change a bit and the test breaks) or because the flows are as expected, but there is a mistake in their construction (i.e. a bug in the \u0027expected\u0027 flows too).","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"03dd6ae1662fe0bac2fa1f7925ce05de29dbc415","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"7a77a97e_75b9e278","line":160,"in_reply_to":"7a77a97e_d4203f4c","updated":"2016-11-17 07:14:59.000000000","message":"Yes, actually this functional fullstack case have already been wrote, and I will upload the case when we upload the following patches which including process of other APPs when a active port was detected.","commit_id":"320f13b09d8b848c4b71b534af22b4523734ed2c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d28a001cc0b9cd941233dc3df63128bb982ae060","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                   \u0027mac_address\u0027: mac_address1}]\r"},{"line_number":118,"context_line":"        vm_port.update({\u0027allowed_address_pairs\u0027: allowed_address_pairs1})\r"},{"line_number":119,"context_line":"\r"},{"line_number":120,"context_line":"        time.sleep(3)\r"},{"line_number":121,"context_line":"\r"},{"line_number":122,"context_line":"        result \u003d self._check_sending_arp_reply_to_controller_flows(\r"},{"line_number":123,"context_line":"            of_port, ip_address1)\r"}],"source_content_type":"text/x-python","patch_set":53,"id":"5a74a57a_f93b46cf","line":120,"updated":"2016-11-25 03:29:23.000000000","message":"https://github.com/openstack/dragonflow/blob/master/dragonflow/tests/common/constants.py#L15","commit_id":"3e1a21e7602ebb1fda12d17453122c03451ae7a6"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"25ec7734b1af01ed74c5dec7583ed40134484807","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                   \u0027mac_address\u0027: mac_address1}]\r"},{"line_number":118,"context_line":"        vm_port.update({\u0027allowed_address_pairs\u0027: allowed_address_pairs1})\r"},{"line_number":119,"context_line":"\r"},{"line_number":120,"context_line":"        time.sleep(3)\r"},{"line_number":121,"context_line":"\r"},{"line_number":122,"context_line":"        result \u003d self._check_sending_arp_reply_to_controller_flows(\r"},{"line_number":123,"context_line":"            of_port, ip_address1)\r"}],"source_content_type":"text/x-python","patch_set":53,"id":"5a74a57a_6f192488","line":120,"in_reply_to":"5a74a57a_f93b46cf","updated":"2016-11-25 06:20:35.000000000","message":"Done","commit_id":"3e1a21e7602ebb1fda12d17453122c03451ae7a6"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d28a001cc0b9cd941233dc3df63128bb982ae060","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        allowed_address_pairs2 \u003d [{\u0027ip_address\u0027: ip_address2}]\r"},{"line_number":131,"context_line":"        vm_port.update({\u0027allowed_address_pairs\u0027: allowed_address_pairs2})\r"},{"line_number":132,"context_line":"\r"},{"line_number":133,"context_line":"        time.sleep(3)\r"},{"line_number":134,"context_line":"\r"},{"line_number":135,"context_line":"        result \u003d self._check_sending_arp_reply_to_controller_flows(\r"},{"line_number":136,"context_line":"            of_port, ip_address1)\r"}],"source_content_type":"text/x-python","patch_set":53,"id":"5a74a57a_39369ee6","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":21},"updated":"2016-11-25 03:29:23.000000000","message":"ditto","commit_id":"3e1a21e7602ebb1fda12d17453122c03451ae7a6"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"25ec7734b1af01ed74c5dec7583ed40134484807","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        allowed_address_pairs2 \u003d [{\u0027ip_address\u0027: ip_address2}]\r"},{"line_number":131,"context_line":"        vm_port.update({\u0027allowed_address_pairs\u0027: allowed_address_pairs2})\r"},{"line_number":132,"context_line":"\r"},{"line_number":133,"context_line":"        time.sleep(3)\r"},{"line_number":134,"context_line":"\r"},{"line_number":135,"context_line":"        result \u003d self._check_sending_arp_reply_to_controller_flows(\r"},{"line_number":136,"context_line":"            of_port, ip_address1)\r"}],"source_content_type":"text/x-python","patch_set":53,"id":"5a74a57a_8f1cc078","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":21},"in_reply_to":"5a74a57a_39369ee6","updated":"2016-11-25 06:20:35.000000000","message":"Done","commit_id":"3e1a21e7602ebb1fda12d17453122c03451ae7a6"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d28a001cc0b9cd941233dc3df63128bb982ae060","unresolved":false,"context_lines":[{"line_number":147,"context_line":"\r"},{"line_number":148,"context_line":"        vm.close()\r"},{"line_number":149,"context_line":"\r"},{"line_number":150,"context_line":"        time.sleep(3)\r"},{"line_number":151,"context_line":"\r"},{"line_number":152,"context_line":"        result \u003d self._check_sending_arp_reply_to_controller_flows(\r"},{"line_number":153,"context_line":"            of_port, ip_address2)\r"}],"source_content_type":"text/x-python","patch_set":53,"id":"5a74a57a_794e5670","line":150,"range":{"start_line":150,"start_character":8,"end_line":150,"end_character":21},"updated":"2016-11-25 03:29:23.000000000","message":"ditto","commit_id":"3e1a21e7602ebb1fda12d17453122c03451ae7a6"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"25ec7734b1af01ed74c5dec7583ed40134484807","unresolved":false,"context_lines":[{"line_number":147,"context_line":"\r"},{"line_number":148,"context_line":"        vm.close()\r"},{"line_number":149,"context_line":"\r"},{"line_number":150,"context_line":"        time.sleep(3)\r"},{"line_number":151,"context_line":"\r"},{"line_number":152,"context_line":"        result \u003d self._check_sending_arp_reply_to_controller_flows(\r"},{"line_number":153,"context_line":"            of_port, ip_address2)\r"}],"source_content_type":"text/x-python","patch_set":53,"id":"5a74a57a_af133c65","line":150,"range":{"start_line":150,"start_character":8,"end_line":150,"end_character":21},"in_reply_to":"5a74a57a_794e5670","updated":"2016-11-25 06:20:35.000000000","message":"Done","commit_id":"3e1a21e7602ebb1fda12d17453122c03451ae7a6"}]}
