)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"86c2986e2feafe151e90cbda2a11af30fa40af4e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The implementation of distributed-DNAT"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the distributed DNAT of blueprint distributed-fip. The"},{"line_number":10,"context_line":"first stage only implements the VxLAN external network. The change as below"},{"line_number":11,"context_line":"1. A df-l3-agent will be used to replace neutron-l3-agent."},{"line_number":12,"context_line":"df-l3-agent need to be deployed on the centralized network node."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3afc51ec_952496c5","line":9,"range":{"start_line":9,"start_character":56,"end_line":9,"end_character":71},"updated":"2016-03-15 07:36:37.000000000","message":"it should be fip-distribution for the link to work","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"413759da6d6ec98a81025009a91ddb439373aac5","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The implementation of distributed-DNAT"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the distributed DNAT of blueprint distributed-fip. The"},{"line_number":10,"context_line":"first stage only implements the VxLAN external network. The change as below"},{"line_number":11,"context_line":"1. A df-l3-agent will be used to replace neutron-l3-agent."},{"line_number":12,"context_line":"df-l3-agent need to be deployed on the centralized network node."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3afc51ec_d6df4167","line":9,"range":{"start_line":9,"start_character":56,"end_line":9,"end_character":71},"in_reply_to":"3afc51ec_952496c5","updated":"2016-03-15 10:01:26.000000000","message":"will do","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"86c2986e2feafe151e90cbda2a11af30fa40af4e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"The implementation of distributed-DNAT"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the distributed DNAT of blueprint distributed-fip. The"},{"line_number":10,"context_line":"first stage only implements the VxLAN external network. The change as below"},{"line_number":11,"context_line":"1. A df-l3-agent will be used to replace neutron-l3-agent."},{"line_number":12,"context_line":"df-l3-agent need to be deployed on the centralized network node."},{"line_number":13,"context_line":"2. A new dnat app will be loaded to dragonflow controller."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3afc51ec_b58b92c2","line":10,"range":{"start_line":10,"start_character":32,"end_line":10,"end_character":39},"updated":"2016-03-15 07:36:37.000000000","message":"I think it is for any tunnel encapsulation based solution\nGRE,VxLan, Geneve","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"413759da6d6ec98a81025009a91ddb439373aac5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"The implementation of distributed-DNAT"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the distributed DNAT of blueprint distributed-fip. The"},{"line_number":10,"context_line":"first stage only implements the VxLAN external network. The change as below"},{"line_number":11,"context_line":"1. A df-l3-agent will be used to replace neutron-l3-agent."},{"line_number":12,"context_line":"df-l3-agent need to be deployed on the centralized network node."},{"line_number":13,"context_line":"2. A new dnat app will be loaded to dragonflow controller."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3afc51ec_f6e23d2e","line":10,"range":{"start_line":10,"start_character":32,"end_line":10,"end_character":39},"in_reply_to":"3afc51ec_b58b92c2","updated":"2016-03-15 10:01:26.000000000","message":"yes. will do","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"}],"devstack/df-ext-services.sh":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Locate devstack directory"},{"line_number":4,"context_line":"TOP_DIR\u003d/opt/stack/devstack"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# Detect path for this script file"},{"line_number":7,"context_line":"DF_DIR\u003d$(cd $(dirname \"$0\") \u0026\u0026 pwd)"}],"source_content_type":"text/x-sh","patch_set":15,"id":"fa0719c6_5495643e","line":4,"updated":"2016-03-20 19:27:25.000000000","message":"Please don\u0027t deliver this modification.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Locate devstack directory"},{"line_number":4,"context_line":"TOP_DIR\u003d/opt/stack/devstack"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# Detect path for this script file"},{"line_number":7,"context_line":"DF_DIR\u003d$(cd $(dirname \"$0\") \u0026\u0026 pwd)"}],"source_content_type":"text/x-sh","patch_set":15,"id":"fa0719c6_daa07aa8","line":4,"in_reply_to":"fa0719c6_5495643e","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"4cb08ff604307e64f6abe5a048f11e79fe02c616","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Locate devstack directory"},{"line_number":4,"context_line":"TOP_DIR\u003d/opt/stack/devstack"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# Detect path for this script file"},{"line_number":7,"context_line":"DF_DIR\u003d$(cd $(dirname \"$0\") \u0026\u0026 pwd)"}],"source_content_type":"text/x-sh","patch_set":15,"id":"fa0719c6_849ce76a","line":4,"in_reply_to":"fa0719c6_5495643e","updated":"2016-03-21 05:28:15.000000000","message":"yes, just keep it empty.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Locate devstack directory"},{"line_number":4,"context_line":"TOP_DIR\u003d/opt/stack/devstack"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# Detect path for this script file"},{"line_number":7,"context_line":"DF_DIR\u003d$(cd $(dirname \"$0\") \u0026\u0026 pwd)"}],"source_content_type":"text/x-sh","patch_set":15,"id":"fa0719c6_10edb18b","line":4,"in_reply_to":"fa0719c6_849ce76a","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"}],"dragonflow/cli/df_db.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        db_driver.delete_key(table, name)"},{"line_number":103,"context_line":"    except df_exceptions.DBKeyNotFound:"},{"line_number":104,"context_line":"        print(\u0027Table not found: \u0027 + table)"},{"line_number":105,"context_line":"        return"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_79db191c","line":105,"range":{"start_line":105,"start_character":0,"end_line":105,"end_character":14},"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing this line. It is redundant.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        db_driver.delete_key(table, name)"},{"line_number":103,"context_line":"    except df_exceptions.DBKeyNotFound:"},{"line_number":104,"context_line":"        print(\u0027Table not found: \u0027 + table)"},{"line_number":105,"context_line":"        return"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_cb1c347a","line":105,"range":{"start_line":105,"start_character":0,"end_line":105,"end_character":14},"in_reply_to":"7af24918_79db191c","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"}],"dragonflow/cmd/eventlet/__init__.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7af24918_b97801fa","updated":"2016-03-07 10:12:39.000000000","message":"This is already done in https://review.openstack.org/#/c/257838/. Consider basing this patch on that.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5aef4532_cbcb941d","in_reply_to":"7af24918_b97801fa","updated":"2016-03-08 12:11:18.000000000","message":"This can be removed. Just because the depended patch is not merged. It will impact the start of df-l3-agent.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"}],"dragonflow/controller/common/utils.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    try:"},{"line_number":30,"context_line":"        return (UINT32_MAX \u003c\u003c (32 - mask)) \u0026 UINT32_MAX"},{"line_number":31,"context_line":"    except ValueError:"},{"line_number":32,"context_line":"        msg \u003d \u0027illegal netmask\u0027"},{"line_number":33,"context_line":"        if err_msg is not None:"},{"line_number":34,"context_line":"            msg \u003d \u0027%s %s\u0027 % (err_msg, msg)"},{"line_number":35,"context_line":"            raise ValueError(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_f96c490a","line":35,"range":{"start_line":32,"start_character":0,"end_line":35,"end_character":33},"updated":"2016-03-07 10:12:39.000000000","message":"Consider catching the error at the caller, and adding the err_msg there.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    try:"},{"line_number":30,"context_line":"        return (UINT32_MAX \u003c\u003c (32 - mask)) \u0026 UINT32_MAX"},{"line_number":31,"context_line":"    except ValueError:"},{"line_number":32,"context_line":"        msg \u003d \u0027illegal netmask\u0027"},{"line_number":33,"context_line":"        if err_msg is not None:"},{"line_number":34,"context_line":"            msg \u003d \u0027%s %s\u0027 % (err_msg, msg)"},{"line_number":35,"context_line":"            raise ValueError(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_f8dd5515","line":35,"range":{"start_line":32,"start_character":0,"end_line":35,"end_character":33},"in_reply_to":"7af24918_f96c490a","updated":"2016-03-08 12:11:18.000000000","message":"is there any problem to catch the error on the common the utils function?","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"}],"dragonflow/controller/df_base_app.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class DFlowApp(DBNotifyInterface):"},{"line_number":24,"context_line":"    def __init__(self, api, **kwargs):"},{"line_number":25,"context_line":"        self.api \u003d api"},{"line_number":26,"context_line":"        self.db_store \u003d kwargs[\u0027db_store\u0027]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def get_datapath(self):"},{"line_number":29,"context_line":"        return self.api.datapath"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_d9486d8a","line":26,"updated":"2016-03-07 10:12:39.000000000","message":"Why is this better?","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class DFlowApp(DBNotifyInterface):"},{"line_number":24,"context_line":"    def __init__(self, api, **kwargs):"},{"line_number":25,"context_line":"        self.api \u003d api"},{"line_number":26,"context_line":"        self.db_store \u003d kwargs[\u0027db_store\u0027]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def get_datapath(self):"},{"line_number":29,"context_line":"        return self.api.datapath"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_0be9fb1a","line":26,"in_reply_to":"7af24918_d9486d8a","updated":"2016-03-08 12:11:18.000000000","message":"Because current the APP manage just support pass the db store and df-app cannot access ovs with ovsdb protocol. some app need to manage ovs actually. so If we use variable arguments, it can let app to sopport more itself requirement.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                 floatingip.__str__())"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def _associate_floatingip(self, floatingip):"},{"line_number":426,"context_line":"        self.open_flow_app.notify_associate_floatingip(floatingip)"},{"line_number":427,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"},{"line_number":428,"context_line":"        LOG.info(_LI(\"Floatingip is assoicated with port. Floatingip \u003d %s\") %"},{"line_number":429,"context_line":"                 floatingip.__str__())"},{"line_number":430,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_7dbe9700","line":427,"range":{"start_line":426,"start_character":0,"end_line":427,"end_character":68},"updated":"2016-03-07 10:12:39.000000000","message":"Consider changing the order, so that when apps are notified, the relevant info is already in the database.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                 floatingip.__str__())"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def _associate_floatingip(self, floatingip):"},{"line_number":426,"context_line":"        self.open_flow_app.notify_associate_floatingip(floatingip)"},{"line_number":427,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"},{"line_number":428,"context_line":"        LOG.info(_LI(\"Floatingip is assoicated with port. Floatingip \u003d %s\") %"},{"line_number":429,"context_line":"                 floatingip.__str__())"},{"line_number":430,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_58f44986","line":427,"range":{"start_line":426,"start_character":0,"end_line":427,"end_character":68},"in_reply_to":"5aef4532_7dbe9700","updated":"2016-03-08 12:11:18.000000000","message":"will done","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"352b5440098f4bacb38fd5a732b383fbfc11f64f","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                 floatingip.__str__())"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def _associate_floatingip(self, floatingip):"},{"line_number":426,"context_line":"        self.open_flow_app.notify_associate_floatingip(floatingip)"},{"line_number":427,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"},{"line_number":428,"context_line":"        LOG.info(_LI(\"Floatingip is assoicated with port. Floatingip \u003d %s\") %"},{"line_number":429,"context_line":"                 floatingip.__str__())"},{"line_number":430,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_e807361a","line":427,"range":{"start_line":426,"start_character":0,"end_line":427,"end_character":68},"updated":"2016-03-08 12:59:48.000000000","message":"This change wasn\u0027t complete. Was it intentional?","commit_id":"b82f84c46827005ee705097975a8bdf210acdef5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"ed2919ca3a31bc40b34c88b96d92c96cc8fac38c","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                 floatingip.__str__())"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def _associate_floatingip(self, floatingip):"},{"line_number":426,"context_line":"        self.open_flow_app.notify_associate_floatingip(floatingip)"},{"line_number":427,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"},{"line_number":428,"context_line":"        LOG.info(_LI(\"Floatingip is assoicated with port. Floatingip \u003d %s\") %"},{"line_number":429,"context_line":"                 floatingip.__str__())"},{"line_number":430,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_5bbb71e5","line":427,"range":{"start_line":426,"start_character":0,"end_line":427,"end_character":68},"in_reply_to":"5aef4532_e807361a","updated":"2016-03-09 03:19:44.000000000","message":"Done","commit_id":"b82f84c46827005ee705097975a8bdf210acdef5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            return"},{"line_number":431,"context_line":"        self.open_flow_app.notify_delete_floatingip(floatingip)"},{"line_number":432,"context_line":"        LOG.info(_LI(\"Floatingip is deleted. Floatingip \u003d %s\") %"},{"line_number":433,"context_line":"                 floatingip.__str__())"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def _associate_floatingip(self, floatingip):"},{"line_number":436,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_b48cc036","line":433,"updated":"2016-03-20 19:27:25.000000000","message":"Consider using str(floatingip) rather than __str__ directly. (Appears more than once in this file.)","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            return"},{"line_number":431,"context_line":"        self.open_flow_app.notify_delete_floatingip(floatingip)"},{"line_number":432,"context_line":"        LOG.info(_LI(\"Floatingip is deleted. Floatingip \u003d %s\") %"},{"line_number":433,"context_line":"                 floatingip.__str__())"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def _associate_floatingip(self, floatingip):"},{"line_number":436,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_5a958a3e","line":433,"in_reply_to":"fa0719c6_b48cc036","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"4cb08ff604307e64f6abe5a048f11e79fe02c616","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"},{"line_number":437,"context_line":"        self.open_flow_app.notify_associate_floatingip(floatingip)"},{"line_number":438,"context_line":"        LOG.info(_LI(\"Floatingip is assoicated with port. Floatingip \u003d %s\") %"},{"line_number":439,"context_line":"                 floatingip.__str__())"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    def _disassociate_floatingip(self, floatingip):"},{"line_number":442,"context_line":"        self.db_store.delete_floatingip(floatingip.name)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_a4adab8a","line":439,"range":{"start_line":439,"start_character":17,"end_line":439,"end_character":37},"updated":"2016-03-21 05:28:15.000000000","message":"ditto","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        self.db_store.update_floatingip(floatingip.name, floatingip)"},{"line_number":437,"context_line":"        self.open_flow_app.notify_associate_floatingip(floatingip)"},{"line_number":438,"context_line":"        LOG.info(_LI(\"Floatingip is assoicated with port. Floatingip \u003d %s\") %"},{"line_number":439,"context_line":"                 floatingip.__str__())"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    def _disassociate_floatingip(self, floatingip):"},{"line_number":442,"context_line":"        self.db_store.delete_floatingip(floatingip.name)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_90f9c150","line":439,"range":{"start_line":439,"start_character":17,"end_line":439,"end_character":37},"in_reply_to":"fa0719c6_a4adab8a","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"4cb08ff604307e64f6abe5a048f11e79fe02c616","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        self.open_flow_app.notify_disassociate_floatingip(floatingip)"},{"line_number":444,"context_line":"        LOG.info(_LI(\"Floatingip is disassoicated from port.\""},{"line_number":445,"context_line":"                 \" Floatingip \u003d %s\") %"},{"line_number":446,"context_line":"                 floatingip.__str__())"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _update_floatingip(self, old_floatingip, new_floatingip):"},{"line_number":449,"context_line":"        if new_floatingip.lport_id !\u003d old_floatingip.lport_id:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_24b07bdd","line":446,"range":{"start_line":446,"start_character":17,"end_line":446,"end_character":37},"updated":"2016-03-21 05:28:15.000000000","message":"ditto","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        self.open_flow_app.notify_disassociate_floatingip(floatingip)"},{"line_number":444,"context_line":"        LOG.info(_LI(\"Floatingip is disassoicated from port.\""},{"line_number":445,"context_line":"                 \" Floatingip \u003d %s\") %"},{"line_number":446,"context_line":"                 floatingip.__str__())"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _update_floatingip(self, old_floatingip, new_floatingip):"},{"line_number":449,"context_line":"        if new_floatingip.lport_id !\u003d old_floatingip.lport_id:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_f0947de9","line":446,"range":{"start_line":446,"start_character":17,"end_line":446,"end_character":37},"in_reply_to":"fa0719c6_24b07bdd","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"}],"dragonflow/controller/dnat_app.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                          arp_request_pkt)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _create_external_bridge(self):"},{"line_number":125,"context_line":"        self.external_ofport \u003d self.vswitch_api.create_patch_port(\u0027br-int\u0027,"},{"line_number":126,"context_line":"                                           self.ex_peer_patch_port,"},{"line_number":127,"context_line":"                                           self.int_peer_patch_port)"},{"line_number":128,"context_line":"        self.vswitch_api.create_patch_port(self.external_network_bridge,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_1d231307","line":125,"range":{"start_line":125,"start_character":66,"end_line":125,"end_character":74},"updated":"2016-03-07 10:12:39.000000000","message":"Consider making this a constant.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                          arp_request_pkt)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _create_external_bridge(self):"},{"line_number":125,"context_line":"        self.external_ofport \u003d self.vswitch_api.create_patch_port(\u0027br-int\u0027,"},{"line_number":126,"context_line":"                                           self.ex_peer_patch_port,"},{"line_number":127,"context_line":"                                           self.int_peer_patch_port)"},{"line_number":128,"context_line":"        self.vswitch_api.create_patch_port(self.external_network_bridge,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_b84aadc3","line":125,"range":{"start_line":125,"start_character":66,"end_line":125,"end_character":74},"in_reply_to":"5aef4532_1d231307","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                           self.int_peer_patch_port,"},{"line_number":130,"context_line":"                                           self.ex_peer_patch_port)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _set_external_network(self, network_id):"},{"line_number":133,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":134,"context_line":"        if refcnt is None:"},{"line_number":135,"context_line":"            self.external_networks[network_id] \u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_b2be86d2","line":132,"updated":"2016-03-07 10:12:39.000000000","message":"Consider renaming to _inc_external_network_count or _add_external_network","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                           self.int_peer_patch_port,"},{"line_number":130,"context_line":"                                           self.ex_peer_patch_port)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _set_external_network(self, network_id):"},{"line_number":133,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":134,"context_line":"        if refcnt is None:"},{"line_number":135,"context_line":"            self.external_networks[network_id] \u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_d8633940","line":132,"in_reply_to":"5aef4532_b2be86d2","updated":"2016-03-08 12:11:18.000000000","message":"good, will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                           self.ex_peer_patch_port)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _set_external_network(self, network_id):"},{"line_number":133,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":134,"context_line":"        if refcnt is None:"},{"line_number":135,"context_line":"            self.external_networks[network_id] \u003d 1"},{"line_number":136,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_3186f8b9","line":133,"updated":"2016-03-07 10:12:39.000000000","message":"Consider setting the default to 0. Then you can always set it to refcnt+1 without testing.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                           self.ex_peer_patch_port)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _set_external_network(self, network_id):"},{"line_number":133,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":134,"context_line":"        if refcnt is None:"},{"line_number":135,"context_line":"            self.external_networks[network_id] \u003d 1"},{"line_number":136,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_d8f1796c","line":133,"in_reply_to":"5aef4532_3186f8b9","updated":"2016-03-08 12:11:18.000000000","message":"thanks, will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            self.external_networks[network_id] +\u003d 1"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def _remove_external_network(self, network_id):"},{"line_number":140,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":141,"context_line":"        if refcnt:"},{"line_number":142,"context_line":"            if refcnt \u003d\u003d 1:"},{"line_number":143,"context_line":"                del self.external_networks[network_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_f17130e2","line":140,"updated":"2016-03-07 10:12:39.000000000","message":"Consider setting the default to 0. The you could do without the external condition.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            self.external_networks[network_id] +\u003d 1"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def _remove_external_network(self, network_id):"},{"line_number":140,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":141,"context_line":"        if refcnt:"},{"line_number":142,"context_line":"            if refcnt \u003d\u003d 1:"},{"line_number":143,"context_line":"                del self.external_networks[network_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_78030543","line":140,"in_reply_to":"5aef4532_f17130e2","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                self.external_networks[network_id] -\u003d 1"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_external_network_count(self, network_id):"},{"line_number":148,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":149,"context_line":"        if refcnt is None:"},{"line_number":150,"context_line":"            return 0"},{"line_number":151,"context_line":"        return refcnt"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_b14e8894","line":148,"updated":"2016-03-07 10:12:39.000000000","message":"Consider setting the default to 0. Then you could return refcnt directly, without testing.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                self.external_networks[network_id] -\u003d 1"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_external_network_count(self, network_id):"},{"line_number":148,"context_line":"        refcnt \u003d self.external_networks.get(network_id, None)"},{"line_number":149,"context_line":"        if refcnt is None:"},{"line_number":150,"context_line":"            return 0"},{"line_number":151,"context_line":"        return refcnt"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_d898591e","line":148,"in_reply_to":"5aef4532_b14e8894","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            match.set_metadata(network_id)"},{"line_number":173,"context_line":"        return match"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_packet_in_instructions(self, floatingip_id):"},{"line_number":176,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":177,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_0cd11fce","line":175,"updated":"2016-03-07 10:12:39.000000000","message":"Consider renaming to _get_instruction_packet_in.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            match.set_metadata(network_id)"},{"line_number":173,"context_line":"        return match"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_packet_in_instructions(self, floatingip_id):"},{"line_number":176,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":177,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_988ff1cb","line":175,"in_reply_to":"5aef4532_0cd11fce","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        # process gratuitous arp"},{"line_number":200,"context_line":"        match \u003d self._get_gratuitous_arp_match("},{"line_number":201,"context_line":"            floatingip.external_gateway_ip)"},{"line_number":202,"context_line":"        instructions \u003d self._get_packet_in_instructions(floatingip.name)"},{"line_number":203,"context_line":"        self.mod_flow("},{"line_number":204,"context_line":"            self.get_datapath(),"},{"line_number":205,"context_line":"            inst\u003dinstructions,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_771a3070","line":202,"updated":"2016-03-07 10:12:39.000000000","message":"These are the same instructions as above. Consider reusing.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        # process gratuitous arp"},{"line_number":200,"context_line":"        match \u003d self._get_gratuitous_arp_match("},{"line_number":201,"context_line":"            floatingip.external_gateway_ip)"},{"line_number":202,"context_line":"        instructions \u003d self._get_packet_in_instructions(floatingip.name)"},{"line_number":203,"context_line":"        self.mod_flow("},{"line_number":204,"context_line":"            self.get_datapath(),"},{"line_number":205,"context_line":"            inst\u003dinstructions,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_987d31b4","line":202,"in_reply_to":"5aef4532_771a3070","updated":"2016-03-08 12:11:18.000000000","message":"yes, will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        vm_mac, vm_ip, vm_ofport, _ \u003d self._get_vm_port_info(floatingip)"},{"line_number":271,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":272,"context_line":"        actions \u003d []"},{"line_number":273,"context_line":"        # actions.append(parser.OFPActionPopVlan())"},{"line_number":274,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":275,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dvm_mac))"},{"line_number":276,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_f7e12000","line":273,"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing comment.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        vm_mac, vm_ip, vm_ofport, _ \u003d self._get_vm_port_info(floatingip)"},{"line_number":271,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":272,"context_line":"        actions \u003d []"},{"line_number":273,"context_line":"        # actions.append(parser.OFPActionPopVlan())"},{"line_number":274,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":275,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dvm_mac))"},{"line_number":276,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_5b3d63ba","line":273,"in_reply_to":"5aef4532_f7e12000","updated":"2016-03-08 12:11:18.000000000","message":"it reserves for vlan network. ok, I will remove it.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":272,"context_line":"        actions \u003d []"},{"line_number":273,"context_line":"        # actions.append(parser.OFPActionPopVlan())"},{"line_number":274,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":275,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dvm_mac))"},{"line_number":276,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"},{"line_number":277,"context_line":"        actions.append(parser.OFPActionSetField(ipv4_dst\u003dvm_ip))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_d71184b1","line":274,"updated":"2016-03-07 10:12:39.000000000","message":"Should this be the fip_mac, or the virtual subnet\u0027s router\u0027s mac?","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":272,"context_line":"        actions \u003d []"},{"line_number":273,"context_line":"        # actions.append(parser.OFPActionPopVlan())"},{"line_number":274,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":275,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dvm_mac))"},{"line_number":276,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"},{"line_number":277,"context_line":"        actions.append(parser.OFPActionSetField(ipv4_dst\u003dvm_ip))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_5be3a305","line":274,"in_reply_to":"5aef4532_d71184b1","updated":"2016-03-08 12:11:18.000000000","message":"I think both of them are ok. Here I use fip_mac but not the subnet router mac. it because I take fip as the local gateway. it likes a local subnet gateway interface.  In the original DVR solution there is local fip_gateway_port.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":320,"context_line":"        match \u003d self._get_snat_match(floatingip)"},{"line_number":321,"context_line":"        actions \u003d []"},{"line_number":322,"context_line":"        # actions.append(parser.OFPActionPopVlan())"},{"line_number":323,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":324,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dgw_mac))"},{"line_number":325,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_b7679824","line":322,"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing comment.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":320,"context_line":"        match \u003d self._get_snat_match(floatingip)"},{"line_number":321,"context_line":"        actions \u003d []"},{"line_number":322,"context_line":"        # actions.append(parser.OFPActionPopVlan())"},{"line_number":323,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":324,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dgw_mac))"},{"line_number":325,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_1bb8fbe4","line":322,"in_reply_to":"5aef4532_b7679824","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    def _install_ingress_nat_rules(self, floatingip):"},{"line_number":380,"context_line":"        segmentation_id \u003d self.db_store.get_network_id("},{"line_number":381,"context_line":"            floatingip.floating_network_id)"},{"line_number":382,"context_line":"        segmentation_id \u003d segmentation_id"},{"line_number":383,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":384,"context_line":"        match \u003d parser.OFPMatch()"},{"line_number":385,"context_line":"        match.set_in_port(self.external_ofport)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_3210b64e","line":382,"range":{"start_line":382,"start_character":0,"end_line":382,"end_character":41},"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing this line.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    def _install_ingress_nat_rules(self, floatingip):"},{"line_number":380,"context_line":"        segmentation_id \u003d self.db_store.get_network_id("},{"line_number":381,"context_line":"            floatingip.floating_network_id)"},{"line_number":382,"context_line":"        segmentation_id \u003d segmentation_id"},{"line_number":383,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":384,"context_line":"        match \u003d parser.OFPMatch()"},{"line_number":385,"context_line":"        match.set_in_port(self.external_ofport)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_3bacd79f","line":382,"range":{"start_line":382,"start_character":0,"end_line":382,"end_character":41},"in_reply_to":"5aef4532_3210b64e","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":384,"context_line":"        match \u003d parser.OFPMatch()"},{"line_number":385,"context_line":"        match.set_in_port(self.external_ofport)"},{"line_number":386,"context_line":"        # check the network type"},{"line_number":387,"context_line":"        # match.set_dl_type(ether.ETH_TYPE_8021Q)"},{"line_number":388,"context_line":"        # match.set_vlan_vid(segmentation_id)"},{"line_number":389,"context_line":"        if not self.db_store.get_floatingips():"},{"line_number":390,"context_line":"            # if it is the first floating ip on this node, then"},{"line_number":391,"context_line":"            # install the common goto flow rule."}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_12201a9b","line":388,"range":{"start_line":386,"start_character":0,"end_line":388,"end_character":45},"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing these comments.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":384,"context_line":"        match \u003d parser.OFPMatch()"},{"line_number":385,"context_line":"        match.set_in_port(self.external_ofport)"},{"line_number":386,"context_line":"        # check the network type"},{"line_number":387,"context_line":"        # match.set_dl_type(ether.ETH_TYPE_8021Q)"},{"line_number":388,"context_line":"        # match.set_vlan_vid(segmentation_id)"},{"line_number":389,"context_line":"        if not self.db_store.get_floatingips():"},{"line_number":390,"context_line":"            # if it is the first floating ip on this node, then"},{"line_number":391,"context_line":"            # install the common goto flow rule."}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_7b965f4d","line":388,"range":{"start_line":386,"start_character":0,"end_line":388,"end_character":45},"in_reply_to":"5aef4532_12201a9b","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        if not self.db_store.get_floatingips():"},{"line_number":390,"context_line":"            # if it is the first floating ip on this node, then"},{"line_number":391,"context_line":"            # install the common goto flow rule."},{"line_number":392,"context_line":"            self.add_flow_go_to_table(self.get_datapath(),"},{"line_number":393,"context_line":"                const.INGRESS_CLASSIFICATION_DISPATCH_TABLE,"},{"line_number":394,"context_line":"                const.PRIORITY_DEFAULT,"},{"line_number":395,"context_line":"                const.INGRESS_NAT_TABLE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_72e4fe3a","line":392,"updated":"2016-03-07 10:12:39.000000000","message":"+1 on the lazy instantiation pattern.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        if not self.db_store.get_floatingips():"},{"line_number":390,"context_line":"            # if it is the first floating ip on this node, then"},{"line_number":391,"context_line":"            # install the common goto flow rule."},{"line_number":392,"context_line":"            self.add_flow_go_to_table(self.get_datapath(),"},{"line_number":393,"context_line":"                const.INGRESS_CLASSIFICATION_DISPATCH_TABLE,"},{"line_number":394,"context_line":"                const.PRIORITY_DEFAULT,"},{"line_number":395,"context_line":"                const.INGRESS_NAT_TABLE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_3713430f","line":392,"in_reply_to":"5aef4532_72e4fe3a","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        self._remove_external_network(network_id)"},{"line_number":428,"context_line":"        self._remove_dnat_rules(floatingip)"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def switch_features_handler(self, ev):"},{"line_number":431,"context_line":"        pass"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def remove_local_port(self, lport):"},{"line_number":434,"context_line":"        pass"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"    def remove_remote_port(self, lport):"},{"line_number":437,"context_line":"        pass"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def add_local_port(self, lport):"},{"line_number":440,"context_line":"        pass"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def add_remote_port(self, lport):"},{"line_number":443,"context_line":"        pass"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def associate_floatingip(self, floatingip):"},{"line_number":446,"context_line":"        self._install_ingress_nat_rules(floatingip)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_b293264f","line":443,"range":{"start_line":430,"start_character":0,"end_line":443,"end_character":12},"updated":"2016-03-07 10:12:39.000000000","message":"Are these empty methods necessary?","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        self._remove_external_network(network_id)"},{"line_number":428,"context_line":"        self._remove_dnat_rules(floatingip)"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def switch_features_handler(self, ev):"},{"line_number":431,"context_line":"        pass"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def remove_local_port(self, lport):"},{"line_number":434,"context_line":"        pass"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"    def remove_remote_port(self, lport):"},{"line_number":437,"context_line":"        pass"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def add_local_port(self, lport):"},{"line_number":440,"context_line":"        pass"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def add_remote_port(self, lport):"},{"line_number":443,"context_line":"        pass"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def associate_floatingip(self, floatingip):"},{"line_number":446,"context_line":"        self._install_ingress_nat_rules(floatingip)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_fbdd4f15","line":443,"range":{"start_line":430,"start_character":0,"end_line":443,"end_character":12},"in_reply_to":"5aef4532_b293264f","updated":"2016-03-08 12:11:18.000000000","message":"will remove","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"352b5440098f4bacb38fd5a732b383fbfc11f64f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self.int_peer_patch_port \u003d cfg.CONF.df_dnat_app.int_peer_patch_port"},{"line_number":56,"context_line":"        self.ex_peer_patch_port \u003d cfg.CONF.df_dnat_app.ex_peer_patch_port"},{"line_number":57,"context_line":"        self._create_external_bridge()"},{"line_number":58,"context_line":"        self.external_networks \u003d {}"},{"line_number":59,"context_line":"        self.external_gateway_mac \u003d {}"},{"line_number":60,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"},{"line_number":61,"context_line":"                self.packet_in_handler)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_233821a0","line":58,"updated":"2016-03-08 12:59:48.000000000","message":"Consider changing this to a defaultdict(0). Then whenever the key doesn\u0027t exist, it will set and return 0. I think it works best with the usage here. (Sorry for not mentioning it earlier)","commit_id":"b82f84c46827005ee705097975a8bdf210acdef5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"ed2919ca3a31bc40b34c88b96d92c96cc8fac38c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self.int_peer_patch_port \u003d cfg.CONF.df_dnat_app.int_peer_patch_port"},{"line_number":56,"context_line":"        self.ex_peer_patch_port \u003d cfg.CONF.df_dnat_app.ex_peer_patch_port"},{"line_number":57,"context_line":"        self._create_external_bridge()"},{"line_number":58,"context_line":"        self.external_networks \u003d {}"},{"line_number":59,"context_line":"        self.external_gateway_mac \u003d {}"},{"line_number":60,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"},{"line_number":61,"context_line":"                self.packet_in_handler)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_9bb5f9ef","line":58,"in_reply_to":"5aef4532_233821a0","updated":"2016-03-09 03:19:44.000000000","message":"Done","commit_id":"b82f84c46827005ee705097975a8bdf210acdef5"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"86c2986e2feafe151e90cbda2a11af30fa40af4e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            cfg.CONF.df_dnat_app.external_network_bridge"},{"line_number":58,"context_line":"        self.int_peer_patch_port \u003d cfg.CONF.df_dnat_app.int_peer_patch_port"},{"line_number":59,"context_line":"        self.ex_peer_patch_port \u003d cfg.CONF.df_dnat_app.ex_peer_patch_port"},{"line_number":60,"context_line":"        self._create_external_bridge()"},{"line_number":61,"context_line":"        self.external_networks \u003d collections.defaultdict(int)"},{"line_number":62,"context_line":"        self.external_gateway_mac \u003d {}"},{"line_number":63,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_60714aa8","line":60,"range":{"start_line":60,"start_character":13,"end_line":60,"end_character":36},"updated":"2016-03-15 07:36:37.000000000","message":"We assume that there is only one external network ?\n\nWhat if the user have more then one external networks ?","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"413759da6d6ec98a81025009a91ddb439373aac5","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            cfg.CONF.df_dnat_app.external_network_bridge"},{"line_number":58,"context_line":"        self.int_peer_patch_port \u003d cfg.CONF.df_dnat_app.int_peer_patch_port"},{"line_number":59,"context_line":"        self.ex_peer_patch_port \u003d cfg.CONF.df_dnat_app.ex_peer_patch_port"},{"line_number":60,"context_line":"        self._create_external_bridge()"},{"line_number":61,"context_line":"        self.external_networks \u003d collections.defaultdict(int)"},{"line_number":62,"context_line":"        self.external_gateway_mac \u003d {}"},{"line_number":63,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_13337bf7","line":60,"range":{"start_line":60,"start_character":13,"end_line":60,"end_character":36},"in_reply_to":"3afc51ec_60714aa8","updated":"2016-03-15 10:01:26.000000000","message":"Refer to the original DVR implementation, the external gateway interface is created on the br-int for multiple external network.\nWe can support multiple external networks. If the different external networks via the same external bridge(it\u0027s possible), then create one bridge is enough. If the external network is connecting to different physical network via different bridge , then the bridge should be created when the setup get deployed by administrator. and external gateway interface is created on the br-int and the veth peer attachs to the corresponding external bridge(phy-eth).\n\nSo, I think maybe we need to do a mini change. let administrator to assign the external network port on the br-int and create the external ovs bridge. eg, external_networks\u003d{\u0027net_1\u0027: bridge1, \u0027net_2\u0027: bridge2}","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"86c2986e2feafe151e90cbda2a11af30fa40af4e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            LOG.error(_LE(\"No support for non ARP protocol\"))"},{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if arp_pkt.opcode \u003d\u003d arp.ARP_REPLY:"},{"line_number":96,"context_line":"            fip1 \u003d self._get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":97,"context_line":"            fip2 \u003d self._get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":98,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":99,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":100,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":101,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":102,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"},{"line_number":103,"context_line":"            fip \u003d self._get_floatingip_by_gateway(arp_pkt.dst_ip)"},{"line_number":104,"context_line":"            # update gw mac from fip gateway gratuitous arp"},{"line_number":105,"context_line":"            if fip:"},{"line_number":106,"context_line":"                self._update_external_gateway_mac(fip, arp_pkt.src_mac)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _send_arp_request(self, fip):"},{"line_number":109,"context_line":"        segmentation_id \u003d self.db_store.get_network_id("}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_954ad624","line":106,"range":{"start_line":95,"start_character":8,"end_line":106,"end_character":71},"updated":"2016-03-15 07:36:37.000000000","message":"why not do it with the learn OVS command ?","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"413759da6d6ec98a81025009a91ddb439373aac5","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            LOG.error(_LE(\"No support for non ARP protocol\"))"},{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if arp_pkt.opcode \u003d\u003d arp.ARP_REPLY:"},{"line_number":96,"context_line":"            fip1 \u003d self._get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":97,"context_line":"            fip2 \u003d self._get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":98,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":99,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":100,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":101,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":102,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"},{"line_number":103,"context_line":"            fip \u003d self._get_floatingip_by_gateway(arp_pkt.dst_ip)"},{"line_number":104,"context_line":"            # update gw mac from fip gateway gratuitous arp"},{"line_number":105,"context_line":"            if fip:"},{"line_number":106,"context_line":"                self._update_external_gateway_mac(fip, arp_pkt.src_mac)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _send_arp_request(self, fip):"},{"line_number":109,"context_line":"        segmentation_id \u003d self.db_store.get_network_id("}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_d30e333a","line":106,"range":{"start_line":95,"start_character":8,"end_line":106,"end_character":71},"in_reply_to":"3afc51ec_954ad624","updated":"2016-03-15 10:01:26.000000000","message":"ovs learning can get the external gateway mac address and install the new flow rules. but since df need to install SNAT rule which need match the vm ip, and set the source mac, source ip, and destination gw mac etc....  ovs learning cannot install all the vm\u0027s SNAT rules. df has to trigger the gateway to send reply packet(such as arp reply) to learn the gw mac address once a new vm get associated with a fip. If df controller itself doesn\u0027t get the gw mac.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"86c2986e2feafe151e90cbda2a11af30fa40af4e","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                          arp_request_pkt)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def _create_external_bridge(self):"},{"line_number":129,"context_line":"        self.external_ofport \u003d self.vswitch_api.create_patch_port("},{"line_number":130,"context_line":"            const.DRAGONFLOW_DEFAULT_BRIDGE,"},{"line_number":131,"context_line":"            self.ex_peer_patch_port,"},{"line_number":132,"context_line":"            self.int_peer_patch_port)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_a067d2e7","line":129,"range":{"start_line":129,"start_character":13,"end_line":129,"end_character":29},"updated":"2016-03-15 07:36:37.000000000","message":"We assume that there is only one external network ?\n\nWhat if the user have more then one external networks ?","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"413759da6d6ec98a81025009a91ddb439373aac5","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                          arp_request_pkt)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def _create_external_bridge(self):"},{"line_number":129,"context_line":"        self.external_ofport \u003d self.vswitch_api.create_patch_port("},{"line_number":130,"context_line":"            const.DRAGONFLOW_DEFAULT_BRIDGE,"},{"line_number":131,"context_line":"            self.ex_peer_patch_port,"},{"line_number":132,"context_line":"            self.int_peer_patch_port)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_d63c61ca","line":129,"range":{"start_line":129,"start_character":13,"end_line":129,"end_character":29},"in_reply_to":"3afc51ec_a067d2e7","updated":"2016-03-15 10:01:26.000000000","message":"I suggest to provide a map table for external network and external bridge. then df controller according to different patch port and network_id to distinguish the different external network.\nThis will be done if you think it\u0027s reasonable.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"0b6a3e048221f0be5dddab55690f7bd88dca08d7","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        actions \u003d []"},{"line_number":190,"context_line":"        # actions.append(parser.OFPActionSetField(metadata\u003dfloatingip_id))"},{"line_number":191,"context_line":"        actions.append(parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,"},{"line_number":192,"context_line":"                                          ofproto.OFPCML_NO_BUFFER))"},{"line_number":193,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_a77a2186","line":190,"range":{"start_line":190,"start_character":8,"end_line":190,"end_character":74},"updated":"2016-03-18 03:25:43.000000000","message":"remove it?","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"c70ccd637572189fbd0d6e61a22369e75e6b4999","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        actions \u003d []"},{"line_number":190,"context_line":"        # actions.append(parser.OFPActionSetField(metadata\u003dfloatingip_id))"},{"line_number":191,"context_line":"        actions.append(parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,"},{"line_number":192,"context_line":"                                          ofproto.OFPCML_NO_BUFFER))"},{"line_number":193,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_1dcd2285","line":190,"range":{"start_line":190,"start_character":8,"end_line":190,"end_character":74},"in_reply_to":"1af94dfe_a77a2186","updated":"2016-03-18 04:50:29.000000000","message":"will do","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"86c2986e2feafe151e90cbda2a11af30fa40af4e","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":239,"context_line":"            match\u003dmatch)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def _install_floatingip_arp_responder(self, floatingip):"},{"line_number":242,"context_line":"        # install floatingip arp responder flow rules"},{"line_number":243,"context_line":"        if netaddr.IPAddress(floatingip.ip_address).version !\u003d 4:"},{"line_number":244,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_00b84629","line":241,"range":{"start_line":241,"start_character":8,"end_line":241,"end_character":41},"updated":"2016-03-15 07:36:37.000000000","message":"I am not sure i follow\n\nI thouth that the arp responder for the FIP should be installed on br-ex","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"413759da6d6ec98a81025009a91ddb439373aac5","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":239,"context_line":"            match\u003dmatch)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def _install_floatingip_arp_responder(self, floatingip):"},{"line_number":242,"context_line":"        # install floatingip arp responder flow rules"},{"line_number":243,"context_line":"        if netaddr.IPAddress(floatingip.ip_address).version !\u003d 4:"},{"line_number":244,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_b6955588","line":241,"range":{"start_line":241,"start_character":8,"end_line":241,"end_character":41},"in_reply_to":"3afc51ec_00b84629","updated":"2016-03-15 10:01:26.000000000","message":"Considering the external network bridge may be managed by admin for special usage. it may conflict with df controller. so as we discussed with you and gal, df controller will only manage br-int. All the rules will be managed on br-int.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"4cb08ff604307e64f6abe5a048f11e79fe02c616","unresolved":false,"context_lines":[{"line_number":36,"context_line":"DF_DNAT_APP_OPTS \u003d ["},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027external_network_bridge\u0027,"},{"line_number":38,"context_line":"              default\u003d\u0027br-ex\u0027,"},{"line_number":39,"context_line":"              help\u003d_(\u0027The remote db server ip address\u0027)),"},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027int_peer_patch_port\u0027, default\u003d\u0027patch-ex\u0027,"},{"line_number":41,"context_line":"               help\u003d_(\"Peer patch port in integration bridge for external \""},{"line_number":42,"context_line":"                      \"bridge.\")),"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_44c76f45","line":39,"range":{"start_line":39,"start_character":21,"end_line":39,"end_character":54},"updated":"2016-03-21 05:28:15.000000000","message":"please change it to the right help text.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"},{"line_number":64,"context_line":"                self.packet_in_handler)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_floatingip_by_ip(self, ip):"},{"line_number":67,"context_line":"        floatingips \u003d self.db_store.get_floatingips()"},{"line_number":68,"context_line":"        for fip in floatingips:"},{"line_number":69,"context_line":"            if fip.ip_address \u003d\u003d ip:"},{"line_number":70,"context_line":"                return fip"},{"line_number":71,"context_line":"        return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _get_floatingip_by_gateway(self, ip):"},{"line_number":74,"context_line":"        floatingips \u003d self.db_store.get_floatingips()"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_34a0b090","line":71,"range":{"start_line":66,"start_character":0,"end_line":71,"end_character":19},"updated":"2016-03-20 19:27:25.000000000","message":"Consider moving to db_store","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"},{"line_number":64,"context_line":"                self.packet_in_handler)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_floatingip_by_ip(self, ip):"},{"line_number":67,"context_line":"        floatingips \u003d self.db_store.get_floatingips()"},{"line_number":68,"context_line":"        for fip in floatingips:"},{"line_number":69,"context_line":"            if fip.ip_address \u003d\u003d ip:"},{"line_number":70,"context_line":"                return fip"},{"line_number":71,"context_line":"        return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _get_floatingip_by_gateway(self, ip):"},{"line_number":74,"context_line":"        floatingips \u003d self.db_store.get_floatingips()"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_5a7c6a20","line":71,"range":{"start_line":66,"start_character":0,"end_line":71,"end_character":19},"in_reply_to":"fa0719c6_34a0b090","updated":"2016-03-21 07:30:14.000000000","message":"will do. DB operation will be move the db_store. BTW, actually, when I implements the periodic arp learning feature, I reconstruct this functions.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                return fip"},{"line_number":71,"context_line":"        return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _get_floatingip_by_gateway(self, ip):"},{"line_number":74,"context_line":"        floatingips \u003d self.db_store.get_floatingips()"},{"line_number":75,"context_line":"        for fip in floatingips:"},{"line_number":76,"context_line":"            if fip.external_gateway_ip \u003d\u003d ip:"},{"line_number":77,"context_line":"                return fip"},{"line_number":78,"context_line":"        return None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _update_external_gateway_mac(self, fip, learn_mac):"},{"line_number":81,"context_line":"        net_id \u003d fip.floating_network_id"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_94ad3c8b","line":78,"range":{"start_line":73,"start_character":0,"end_line":78,"end_character":19},"updated":"2016-03-20 19:27:25.000000000","message":"Consider moving to db_store.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                return fip"},{"line_number":71,"context_line":"        return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _get_floatingip_by_gateway(self, ip):"},{"line_number":74,"context_line":"        floatingips \u003d self.db_store.get_floatingips()"},{"line_number":75,"context_line":"        for fip in floatingips:"},{"line_number":76,"context_line":"            if fip.external_gateway_ip \u003d\u003d ip:"},{"line_number":77,"context_line":"                return fip"},{"line_number":78,"context_line":"        return None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _update_external_gateway_mac(self, fip, learn_mac):"},{"line_number":81,"context_line":"        net_id \u003d fip.floating_network_id"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_9a76023d","line":78,"range":{"start_line":73,"start_character":0,"end_line":78,"end_character":19},"in_reply_to":"fa0719c6_94ad3c8b","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            fip1 \u003d self._get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":97,"context_line":"            fip2 \u003d self._get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":98,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":99,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":100,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":101,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":102,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_b4ba00bf","line":99,"updated":"2016-03-20 19:27:25.000000000","message":"Why is it important that the reply is to us/our fip? Any ARP reply from the gateway may contain an update to the IP/MAC pairing. We can preemptively learn the new GW MAC before we need it. Or am I missing something?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            fip1 \u003d self._get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":97,"context_line":"            fip2 \u003d self._get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":98,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":99,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":100,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":101,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":102,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_9adba21b","line":99,"in_reply_to":"fa0719c6_b4ba00bf","updated":"2016-03-21 07:30:14.000000000","message":"We can accept any arp reply from the gateway. Here we verify the dst_ip is because defense arp cheat. Usually if gateway will response only the fip on the compute node.\n\nThe gateway arp request is sent by controller preemptively before VM using fip to access external network. So controller need to process the arp reply to learn the mac.\n\nMeanwhile, if the gateway update its mac actively and send the gratuitous arp, controller need to learn the updated mac also.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def _send_arp_request(self, fip):"},{"line_number":109,"context_line":"        segmentation_id \u003d self.db_store.get_network_id("},{"line_number":110,"context_line":"            fip.floating_network_id)"},{"line_number":111,"context_line":"        segmentation_id \u003d segmentation_id"},{"line_number":112,"context_line":"        # check the network type, snd the packet to external gateway port"},{"line_number":113,"context_line":"        arp_request_pkt \u003d packet.Packet()"},{"line_number":114,"context_line":"        arp_request_pkt.add_protocol(ethernet.ethernet("}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_f4b478d2","line":111,"updated":"2016-03-20 19:27:25.000000000","message":"Where is this variable used?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def _send_arp_request(self, fip):"},{"line_number":109,"context_line":"        segmentation_id \u003d self.db_store.get_network_id("},{"line_number":110,"context_line":"            fip.floating_network_id)"},{"line_number":111,"context_line":"        segmentation_id \u003d segmentation_id"},{"line_number":112,"context_line":"        # check the network type, snd the packet to external gateway port"},{"line_number":113,"context_line":"        arp_request_pkt \u003d packet.Packet()"},{"line_number":114,"context_line":"        arp_request_pkt.add_protocol(ethernet.ethernet("}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_da035a75","line":111,"in_reply_to":"fa0719c6_f4b478d2","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _is_first_external_network(self, network_id):"},{"line_number":148,"context_line":"        for key, val in six.iteritems(self.external_networks):"},{"line_number":149,"context_line":"            if key \u003d\u003d network_id and val !\u003d 0:"},{"line_number":150,"context_line":"                return False"},{"line_number":151,"context_line":"            elif key !\u003d network_id and val \u003e 0:"},{"line_number":152,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_54ca8450","line":149,"updated":"2016-03-20 19:27:25.000000000","message":"Why separate the cases? Isn\u0027t val always \u003e 0 (as in never always \u003c0)? If it is 0, it passes both cases, and if it is not 0 (i.e. \u003e 0), it will always be caught in one case.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _is_first_external_network(self, network_id):"},{"line_number":148,"context_line":"        for key, val in six.iteritems(self.external_networks):"},{"line_number":149,"context_line":"            if key \u003d\u003d network_id and val !\u003d 0:"},{"line_number":150,"context_line":"                return False"},{"line_number":151,"context_line":"            elif key !\u003d network_id and val \u003e 0:"},{"line_number":152,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_f09abdc4","line":149,"in_reply_to":"fa0719c6_54ca8450","updated":"2016-03-21 07:30:14.000000000","message":"A common goto rule will be installed for all the external network(Supposing all the external network share the same external bridge). Here, the val will always \u003e\u003d0. when there val equals to 0, it indicates there is no fip of this external network. otherwise it will \u003e 0.\n\nI think the condition can be following.\nif key \u003d\u003d network_id and val \u003e 0:","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                return False"},{"line_number":153,"context_line":"        return True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _is_last_external_network(self, network_id):"},{"line_number":156,"context_line":"        for key, val in six.iteritems(self.external_networks):"},{"line_number":157,"context_line":"            if key \u003d\u003d network_id and val !\u003d 1:"},{"line_number":158,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_d4dcd41a","line":155,"updated":"2016-03-20 19:27:25.000000000","message":"If I understand correctly, is_last... and is_first... are called for every disassociated and associated fip (respectively). Perhaps it would be easier holding a counter of associated IPs? In _is_first the counter should be 0. In _is_last the counter should be 1, and self.external_networks[network_id] \u003d\u003d 1.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                return False"},{"line_number":153,"context_line":"        return True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _is_last_external_network(self, network_id):"},{"line_number":156,"context_line":"        for key, val in six.iteritems(self.external_networks):"},{"line_number":157,"context_line":"            if key \u003d\u003d network_id and val !\u003d 1:"},{"line_number":158,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_70afcde3","line":155,"in_reply_to":"fa0719c6_d4dcd41a","updated":"2016-03-21 07:30:14.000000000","message":"yes. will change the processing logical","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":165,"context_line":"        match \u003d parser.OFPMatch()"},{"line_number":166,"context_line":"        match.set_dl_type(ether.ETH_TYPE_ARP)"},{"line_number":167,"context_line":"        match.set_arp_tpa(utils.ipv4_text_to_int(str(destination_ip)))"},{"line_number":168,"context_line":"        match.set_arp_opcode(arp.ARP_REPLY)"},{"line_number":169,"context_line":"        if network_id is not None:"},{"line_number":170,"context_line":"            match.set_metadata(network_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_b4084093","line":167,"updated":"2016-03-20 19:27:25.000000000","message":"Why limit ARP replies by destination?\nAlso, consider limiting ARP packets sent to the controller by IPs that can be returned by self._get_floatingip_by_gateway.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":165,"context_line":"        match \u003d parser.OFPMatch()"},{"line_number":166,"context_line":"        match.set_dl_type(ether.ETH_TYPE_ARP)"},{"line_number":167,"context_line":"        match.set_arp_tpa(utils.ipv4_text_to_int(str(destination_ip)))"},{"line_number":168,"context_line":"        match.set_arp_opcode(arp.ARP_REPLY)"},{"line_number":169,"context_line":"        if network_id is not None:"},{"line_number":170,"context_line":"            match.set_metadata(network_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_bacb061e","line":167,"in_reply_to":"fa0719c6_b4084093","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            match.set_metadata(network_id)"},{"line_number":183,"context_line":"        return match"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _get_instructions_packet_in(self, floatingip_id):"},{"line_number":186,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":187,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_d42a14e7","line":185,"updated":"2016-03-20 19:27:25.000000000","message":"Where is this argument used?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            match.set_metadata(network_id)"},{"line_number":183,"context_line":"        return match"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _get_instructions_packet_in(self, floatingip_id):"},{"line_number":186,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":187,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_da17da52","line":185,"in_reply_to":"fa0719c6_d42a14e7","updated":"2016-03-21 07:30:14.000000000","message":"I want to raise a new patch to set the fip id into metadata. and df controller will according metadata to get fip info.\nAnyway, in this patch it can be removed.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        actions \u003d []"},{"line_number":190,"context_line":"        actions.append(parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,"},{"line_number":191,"context_line":"                                          ofproto.OFPCML_NO_BUFFER))"},{"line_number":192,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("},{"line_number":193,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, actions)]"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_94f25c99","line":190,"updated":"2016-03-20 19:27:25.000000000","message":"Why not directly define actions \u003d [parser.OFActionOutpu(...)]?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        actions \u003d []"},{"line_number":190,"context_line":"        actions.append(parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,"},{"line_number":191,"context_line":"                                          ofproto.OFPCML_NO_BUFFER))"},{"line_number":192,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("},{"line_number":193,"context_line":"            ofproto.OFPIT_APPLY_ACTIONS, actions)]"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_da307a0a","line":190,"in_reply_to":"fa0719c6_94f25c99","updated":"2016-03-21 07:30:14.000000000","message":"OK, will do. because more actions will be added in the next patch. such as set the fip id into metadata.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        vm_mac, vm_ip, vm_ofport, _ \u003d self._get_vm_port_info(floatingip)"},{"line_number":279,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":280,"context_line":"        actions \u003d []"},{"line_number":281,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":282,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dvm_mac))"},{"line_number":283,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_9449bcd3","line":280,"updated":"2016-03-20 19:27:25.000000000","message":"Consider initialising actions immediately with its content, rather than using append.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        vm_mac, vm_ip, vm_ofport, _ \u003d self._get_vm_port_info(floatingip)"},{"line_number":279,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":280,"context_line":"        actions \u003d []"},{"line_number":281,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":282,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dvm_mac))"},{"line_number":283,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_5a0c6a42","line":280,"in_reply_to":"fa0719c6_9449bcd3","updated":"2016-03-21 07:30:14.000000000","message":"OK.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":326,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":327,"context_line":"        match \u003d self._get_snat_match(floatingip)"},{"line_number":328,"context_line":"        actions \u003d []"},{"line_number":329,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":330,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dgw_mac))"},{"line_number":331,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_140c8c93","line":328,"updated":"2016-03-20 19:27:25.000000000","message":"Same here re: list initialisation","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        parser \u003d self.get_datapath().ofproto_parser"},{"line_number":326,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":327,"context_line":"        match \u003d self._get_snat_match(floatingip)"},{"line_number":328,"context_line":"        actions \u003d []"},{"line_number":329,"context_line":"        actions.append(parser.OFPActionSetField(eth_src\u003dfip_mac))"},{"line_number":330,"context_line":"        actions.append(parser.OFPActionSetField(eth_dst\u003dgw_mac))"},{"line_number":331,"context_line":"        actions.append(parser.OFPActionDecNwTtl())"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_9a06021f","line":328,"in_reply_to":"fa0719c6_140c8c93","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            inst\u003dinst,"},{"line_number":340,"context_line":"            table_id\u003dconst.EGRESS_NAT_TABLE,"},{"line_number":341,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":342,"context_line":"            match\u003dmatch)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _remove_snat_rules(self, floatingip):"},{"line_number":345,"context_line":"        ofproto \u003d self.get_datapath().ofproto"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_f410f8aa","line":342,"updated":"2016-03-20 19:27:25.000000000","message":"How is this rule applied only to north-south communication, and not for east-west? Won\u0027t communication between VMs also be NATed with this?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            inst\u003dinst,"},{"line_number":340,"context_line":"            table_id\u003dconst.EGRESS_NAT_TABLE,"},{"line_number":341,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":342,"context_line":"            match\u003dmatch)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _remove_snat_rules(self, floatingip):"},{"line_number":345,"context_line":"        ofproto \u003d self.get_datapath().ofproto"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_b5903797","line":342,"in_reply_to":"fa0719c6_f410f8aa","updated":"2016-03-21 07:30:14.000000000","message":"The east-west communication ovs flow rules have the higher priority on the L3_LOOKUP_TABLE.\n\nthe fip-distributed is used for north-south communication. the communication between VMs will not use fip.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            self.add_flow_go_to_table(self.get_datapath(),"},{"line_number":393,"context_line":"                const.INGRESS_CLASSIFICATION_DISPATCH_TABLE,"},{"line_number":394,"context_line":"                const.PRIORITY_DEFAULT,"},{"line_number":395,"context_line":"                const.INGRESS_NAT_TABLE,"},{"line_number":396,"context_line":"                match\u003dmatch)"},{"line_number":397,"context_line":"        self._install_floatingip_arp_responder(floatingip)"},{"line_number":398,"context_line":"        if self._get_external_network_count(network_id) \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_34239007","line":395,"updated":"2016-03-20 19:27:25.000000000","message":"What\u0027s the default action on this table? i.e. when a packet doesn\u0027t match any NAT rules?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            self.add_flow_go_to_table(self.get_datapath(),"},{"line_number":393,"context_line":"                const.INGRESS_CLASSIFICATION_DISPATCH_TABLE,"},{"line_number":394,"context_line":"                const.PRIORITY_DEFAULT,"},{"line_number":395,"context_line":"                const.INGRESS_NAT_TABLE,"},{"line_number":396,"context_line":"                match\u003dmatch)"},{"line_number":397,"context_line":"        self._install_floatingip_arp_responder(floatingip)"},{"line_number":398,"context_line":"        if self._get_external_network_count(network_id) \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_957413fe","line":395,"in_reply_to":"fa0719c6_34239007","updated":"2016-03-21 07:30:14.000000000","message":"A drop rule will be installed as the default process rule.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"64937424ec8d7ec68966c67cc6838c992aa5b075","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if arp_pkt.opcode \u003d\u003d arp.ARP_REPLY:"},{"line_number":82,"context_line":"            fip1 \u003d self.db_store.get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":83,"context_line":"            fip2 \u003d self.db_store.get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":84,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":85,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":86,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_87770c9f","line":83,"range":{"start_line":83,"start_character":12,"end_line":83,"end_character":16},"updated":"2016-03-24 07:08:16.000000000","message":"Please consider using a more descriptive variable name \"fip_gateway\"","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5c532b4d9cfb936003b761e3e0ff1ce040203993","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if arp_pkt.opcode \u003d\u003d arp.ARP_REPLY:"},{"line_number":82,"context_line":"            fip1 \u003d self.db_store.get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":83,"context_line":"            fip2 \u003d self.db_store.get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":84,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":85,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":86,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_5dd65628","line":83,"range":{"start_line":83,"start_character":12,"end_line":83,"end_character":16},"in_reply_to":"fa0719c6_87770c9f","updated":"2016-03-24 13:25:30.000000000","message":"will do","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"24d0614f5cebb8ee35c7468ff42b6ad7416ed30e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            fip1 \u003d self.db_store.get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":83,"context_line":"            fip2 \u003d self.db_store.get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":84,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":85,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":86,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":87,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":88,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_61c13a54","line":85,"updated":"2016-03-23 12:17:09.000000000","message":"(In continuation to discussion on PatchSet 15)\n\nI\u0027m not sure this is the best way to defend against ARP spoofing.","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"90a2add7a2debaec68383ac6b33531c404c444d3","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            fip1 \u003d self.db_store.get_floatingip_by_ip(arp_pkt.dst_ip)"},{"line_number":83,"context_line":"            fip2 \u003d self.db_store.get_floatingip_by_gateway(arp_pkt.src_ip)"},{"line_number":84,"context_line":"            # learn gw mac from fip arp reply packet"},{"line_number":85,"context_line":"            if fip1 and fip2 and fip1 \u003d\u003d fip2:"},{"line_number":86,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":87,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":88,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_72e0c0cd","line":85,"in_reply_to":"fa0719c6_61c13a54","updated":"2016-03-24 01:30:40.000000000","message":"yes, Omer. the destination ip verification cannot support anti-arp spoofing without detecting mac address. This feature is out of the scope of this patch. Let df controller parse all the arp packet from gateway and check the mac updation.","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"64937424ec8d7ec68966c67cc6838c992aa5b075","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":87,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":88,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"},{"line_number":89,"context_line":"            fip \u003d self.db_store.get_floatingip_by_gateway(arp_pkt.dst_ip)"},{"line_number":90,"context_line":"            # update gw mac from fip gateway gratuitous arp"},{"line_number":91,"context_line":"            if fip:"},{"line_number":92,"context_line":"                self._update_external_gateway_mac(fip, arp_pkt.src_mac)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_c7a46409","line":89,"range":{"start_line":89,"start_character":12,"end_line":89,"end_character":15},"updated":"2016-03-24 07:08:16.000000000","message":"consider gw_fip","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5c532b4d9cfb936003b761e3e0ff1ce040203993","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                self._update_external_gateway_mac(fip1, arp_pkt.src_mac)"},{"line_number":87,"context_line":"        elif (arp_pkt.opcode \u003d\u003d arp.ARP_REQUEST and"},{"line_number":88,"context_line":"              arp_pkt.src_ip \u003d\u003d arp_pkt.dst_ip):"},{"line_number":89,"context_line":"            fip \u003d self.db_store.get_floatingip_by_gateway(arp_pkt.dst_ip)"},{"line_number":90,"context_line":"            # update gw mac from fip gateway gratuitous arp"},{"line_number":91,"context_line":"            if fip:"},{"line_number":92,"context_line":"                self._update_external_gateway_mac(fip, arp_pkt.src_mac)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_fdebead9","line":89,"range":{"start_line":89,"start_character":12,"end_line":89,"end_character":15},"in_reply_to":"fa0719c6_c7a46409","updated":"2016-03-24 13:25:30.000000000","message":"will do","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"64937424ec8d7ec68966c67cc6838c992aa5b075","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            if fip:"},{"line_number":92,"context_line":"                self._update_external_gateway_mac(fip, arp_pkt.src_mac)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _send_arp_request(self, fip):"},{"line_number":95,"context_line":"        # check the network type, snd the packet to external gateway port"},{"line_number":96,"context_line":"        arp_request_pkt \u003d packet.Packet()"},{"line_number":97,"context_line":"        arp_request_pkt.add_protocol(ethernet.ethernet("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_c7c904ae","line":94,"range":{"start_line":94,"start_character":8,"end_line":94,"end_character":25},"updated":"2016-03-24 07:08:16.000000000","message":"consider making this method generic in the base class \n\nI think it could be used by other app in the future \n_send_arp_request(dp, src_mac, src_ip, dst_ip, port)","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5c532b4d9cfb936003b761e3e0ff1ce040203993","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            if fip:"},{"line_number":92,"context_line":"                self._update_external_gateway_mac(fip, arp_pkt.src_mac)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _send_arp_request(self, fip):"},{"line_number":95,"context_line":"        # check the network type, snd the packet to external gateway port"},{"line_number":96,"context_line":"        arp_request_pkt \u003d packet.Packet()"},{"line_number":97,"context_line":"        arp_request_pkt.add_protocol(ethernet.ethernet("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_1d4e9ec0","line":94,"range":{"start_line":94,"start_character":8,"end_line":94,"end_character":25},"in_reply_to":"fa0719c6_c7c904ae","updated":"2016-03-24 13:25:30.000000000","message":"will do","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"64937424ec8d7ec68966c67cc6838c992aa5b075","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        actions \u003d ["},{"line_number":269,"context_line":"            parser.OFPActionSetField(eth_src\u003dfip_mac),"},{"line_number":270,"context_line":"            parser.OFPActionSetField(eth_dst\u003dvm_mac),"},{"line_number":271,"context_line":"            parser.OFPActionDecNwTtl(),"},{"line_number":272,"context_line":"            parser.OFPActionSetField(ipv4_dst\u003dvm_ip),"},{"line_number":273,"context_line":"            parser.OFPActionOutput(vm_ofport, 0)]"},{"line_number":274,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_872f0c3e","line":271,"range":{"start_line":271,"start_character":19,"end_line":271,"end_character":36},"updated":"2016-03-24 07:08:16.000000000","message":"Do we need to decrease ttl on DNAT, i am not sure for the VM/user this his Public IP?","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5c532b4d9cfb936003b761e3e0ff1ce040203993","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        actions \u003d ["},{"line_number":269,"context_line":"            parser.OFPActionSetField(eth_src\u003dfip_mac),"},{"line_number":270,"context_line":"            parser.OFPActionSetField(eth_dst\u003dvm_mac),"},{"line_number":271,"context_line":"            parser.OFPActionDecNwTtl(),"},{"line_number":272,"context_line":"            parser.OFPActionSetField(ipv4_dst\u003dvm_ip),"},{"line_number":273,"context_line":"            parser.OFPActionOutput(vm_ofport, 0)]"},{"line_number":274,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_c094398c","line":271,"range":{"start_line":271,"start_character":19,"end_line":271,"end_character":36},"in_reply_to":"fa0719c6_872f0c3e","updated":"2016-03-24 13:25:30.000000000","message":"I think it\u0027s necessary. VM need access external network via L3 gateway. Because NAT is usually implemented on the L3 gateway router. Router will decrease ttl for any ip packet when forwarding. Although there is no vrouter now, but it\u0027s necessary to following the L3 forward rule.","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"64937424ec8d7ec68966c67cc6838c992aa5b075","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                                ipv4_src\u003dvm_ip)"},{"line_number":302,"context_line":"        return match"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def _install_snat_rules(self, floatingip):"},{"line_number":305,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":306,"context_line":"        fip_ip \u003d floatingip.ip_address"},{"line_number":307,"context_line":"        net_id \u003d floatingip.floating_network_id"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_67d91857","line":304,"range":{"start_line":304,"start_character":17,"end_line":304,"end_character":21},"updated":"2016-03-24 07:08:16.000000000","message":"I think that it is confusing that you use SNAT here\njust because in Neutron this term is used for the shared public IP","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5c532b4d9cfb936003b761e3e0ff1ce040203993","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                                ipv4_src\u003dvm_ip)"},{"line_number":302,"context_line":"        return match"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def _install_snat_rules(self, floatingip):"},{"line_number":305,"context_line":"        fip_mac \u003d floatingip.mac_address"},{"line_number":306,"context_line":"        fip_ip \u003d floatingip.ip_address"},{"line_number":307,"context_line":"        net_id \u003d floatingip.floating_network_id"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_209ff55f","line":304,"range":{"start_line":304,"start_character":17,"end_line":304,"end_character":21},"in_reply_to":"fa0719c6_67d91857","updated":"2016-03-24 13:25:30.000000000","message":"will change","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"64937424ec8d7ec68966c67cc6838c992aa5b075","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        actions \u003d ["},{"line_number":317,"context_line":"            parser.OFPActionSetField(eth_src\u003dfip_mac),"},{"line_number":318,"context_line":"            parser.OFPActionSetField(eth_dst\u003dgw_mac),"},{"line_number":319,"context_line":"            parser.OFPActionDecNwTtl(),"},{"line_number":320,"context_line":"            parser.OFPActionSetField(ipv4_src\u003dfip_ip),"},{"line_number":321,"context_line":"            parser.OFPActionOutput(self.external_ofport, 0)]"},{"line_number":322,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_c7dc6448","line":319,"range":{"start_line":319,"start_character":19,"end_line":319,"end_character":36},"updated":"2016-03-24 07:08:16.000000000","message":"ditto","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5c532b4d9cfb936003b761e3e0ff1ce040203993","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        actions \u003d ["},{"line_number":317,"context_line":"            parser.OFPActionSetField(eth_src\u003dfip_mac),"},{"line_number":318,"context_line":"            parser.OFPActionSetField(eth_dst\u003dgw_mac),"},{"line_number":319,"context_line":"            parser.OFPActionDecNwTtl(),"},{"line_number":320,"context_line":"            parser.OFPActionSetField(ipv4_src\u003dfip_ip),"},{"line_number":321,"context_line":"            parser.OFPActionOutput(self.external_ofport, 0)]"},{"line_number":322,"context_line":"        inst \u003d [self.get_datapath().ofproto_parser.OFPInstructionActions("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_c07a7923","line":319,"range":{"start_line":319,"start_character":19,"end_line":319,"end_character":36},"in_reply_to":"fa0719c6_c7dc6448","updated":"2016-03-24 13:25:30.000000000","message":"will do","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"64937424ec8d7ec68966c67cc6838c992aa5b075","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":330,"context_line":"            match\u003dmatch)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _remove_snat_rules(self, floatingip):"},{"line_number":333,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":334,"context_line":"        match \u003d self._get_snat_match(floatingip)"},{"line_number":335,"context_line":"        self.mod_flow("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_e7936859","line":332,"range":{"start_line":332,"start_character":16,"end_line":332,"end_character":21},"updated":"2016-03-24 07:08:16.000000000","message":"ditto","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5c532b4d9cfb936003b761e3e0ff1ce040203993","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            priority\u003dconst.PRIORITY_MEDIUM,"},{"line_number":330,"context_line":"            match\u003dmatch)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _remove_snat_rules(self, floatingip):"},{"line_number":333,"context_line":"        ofproto \u003d self.get_datapath().ofproto"},{"line_number":334,"context_line":"        match \u003d self._get_snat_match(floatingip)"},{"line_number":335,"context_line":"        self.mod_flow("}],"source_content_type":"text/x-python","patch_set":20,"id":"fa0719c6_e0a69dac","line":332,"range":{"start_line":332,"start_character":16,"end_line":332,"end_character":21},"in_reply_to":"fa0719c6_e7936859","updated":"2016-03-24 13:25:30.000000000","message":"will do","commit_id":"4b035bc3a5698839aaac7cfd23e8ace1ccee6c0f"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"bc3c797b74451741622c4e877b129ed92ef61304","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DNATApp(DFlowApp):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":51,"context_line":"        super(DNATApp, self).__init__(*args, **kwargs)"},{"line_number":52,"context_line":"        self.vswitch_api \u003d kwargs[\u0027vswitch_api\u0027]"},{"line_number":53,"context_line":"        self.nb_api \u003d kwargs[\u0027nb_api\u0027]"},{"line_number":54,"context_line":"        cfg.CONF.register_opts(DF_DNAT_APP_OPTS, group\u003d\u0027df_dnat_app\u0027)"},{"line_number":55,"context_line":"        self.external_network_bridge \u003d \\"},{"line_number":56,"context_line":"            cfg.CONF.df_dnat_app.external_network_bridge"}],"source_content_type":"text/x-python","patch_set":21,"id":"da0c15f0_61a09891","line":53,"range":{"start_line":50,"start_character":4,"end_line":53,"end_character":38},"updated":"2016-03-25 03:00:33.000000000","message":"the function arguments are changed.\nhttps://github.com/openstack/dragonflow/commit/452d378f3284efc7431c2ef10ce54b83cabca78c","commit_id":"f0a1f8feb29fe9e7b4d84b1cb742e9cc20d190d3"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"8bd74dd62d31d8dbaae9c499b1e1e3c71f066da4","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DNATApp(DFlowApp):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":51,"context_line":"        super(DNATApp, self).__init__(*args, **kwargs)"},{"line_number":52,"context_line":"        self.vswitch_api \u003d kwargs[\u0027vswitch_api\u0027]"},{"line_number":53,"context_line":"        self.nb_api \u003d kwargs[\u0027nb_api\u0027]"},{"line_number":54,"context_line":"        cfg.CONF.register_opts(DF_DNAT_APP_OPTS, group\u003d\u0027df_dnat_app\u0027)"},{"line_number":55,"context_line":"        self.external_network_bridge \u003d \\"},{"line_number":56,"context_line":"            cfg.CONF.df_dnat_app.external_network_bridge"}],"source_content_type":"text/x-python","patch_set":21,"id":"da0c15f0_43c1ce2d","line":53,"range":{"start_line":50,"start_character":4,"end_line":53,"end_character":38},"in_reply_to":"da0c15f0_228499d2","updated":"2016-03-28 10:17:52.000000000","message":"A new patch will to change all the df APPs arguments into explicit arguments.","commit_id":"f0a1f8feb29fe9e7b4d84b1cb742e9cc20d190d3"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"f8bb9866ce316e9fbc2b5a80629e6d2ca897b697","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DNATApp(DFlowApp):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":51,"context_line":"        super(DNATApp, self).__init__(*args, **kwargs)"},{"line_number":52,"context_line":"        self.vswitch_api \u003d kwargs[\u0027vswitch_api\u0027]"},{"line_number":53,"context_line":"        self.nb_api \u003d kwargs[\u0027nb_api\u0027]"},{"line_number":54,"context_line":"        cfg.CONF.register_opts(DF_DNAT_APP_OPTS, group\u003d\u0027df_dnat_app\u0027)"},{"line_number":55,"context_line":"        self.external_network_bridge \u003d \\"},{"line_number":56,"context_line":"            cfg.CONF.df_dnat_app.external_network_bridge"}],"source_content_type":"text/x-python","patch_set":21,"id":"da0c15f0_00cb4c73","line":53,"range":{"start_line":50,"start_character":4,"end_line":53,"end_character":38},"in_reply_to":"da0c15f0_228499d2","updated":"2016-03-28 08:52:41.000000000","message":"OK, will do","commit_id":"f0a1f8feb29fe9e7b4d84b1cb742e9cc20d190d3"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"c56785f9174c0f7246474bc3816ee1b4a225196d","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DNATApp(DFlowApp):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":51,"context_line":"        super(DNATApp, self).__init__(*args, **kwargs)"},{"line_number":52,"context_line":"        self.vswitch_api \u003d kwargs[\u0027vswitch_api\u0027]"},{"line_number":53,"context_line":"        self.nb_api \u003d kwargs[\u0027nb_api\u0027]"},{"line_number":54,"context_line":"        cfg.CONF.register_opts(DF_DNAT_APP_OPTS, group\u003d\u0027df_dnat_app\u0027)"},{"line_number":55,"context_line":"        self.external_network_bridge \u003d \\"},{"line_number":56,"context_line":"            cfg.CONF.df_dnat_app.external_network_bridge"}],"source_content_type":"text/x-python","patch_set":21,"id":"da0c15f0_e61dd967","line":53,"range":{"start_line":50,"start_character":4,"end_line":53,"end_character":38},"in_reply_to":"da0c15f0_61a09891","updated":"2016-03-25 06:45:07.000000000","message":"yes, the new prototype is following, \ndef __init__(self, api, db_store\u003dNone, vswitch_api\u003dNone, nb_api\u003dNone)\nbut if we use (self, *args, **kwargs), there is no impact in functionality, right? Do you think I should use the explicit arguments and make it clear, right?","commit_id":"f0a1f8feb29fe9e7b4d84b1cb742e9cc20d190d3"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"f0e789b6db059b236ede11445673e9156ddc33b9","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class DNATApp(DFlowApp):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":51,"context_line":"        super(DNATApp, self).__init__(*args, **kwargs)"},{"line_number":52,"context_line":"        self.vswitch_api \u003d kwargs[\u0027vswitch_api\u0027]"},{"line_number":53,"context_line":"        self.nb_api \u003d kwargs[\u0027nb_api\u0027]"},{"line_number":54,"context_line":"        cfg.CONF.register_opts(DF_DNAT_APP_OPTS, group\u003d\u0027df_dnat_app\u0027)"},{"line_number":55,"context_line":"        self.external_network_bridge \u003d \\"},{"line_number":56,"context_line":"            cfg.CONF.df_dnat_app.external_network_bridge"}],"source_content_type":"text/x-python","patch_set":21,"id":"da0c15f0_228499d2","line":53,"range":{"start_line":50,"start_character":4,"end_line":53,"end_character":38},"in_reply_to":"da0c15f0_e61dd967","updated":"2016-03-28 07:16:06.000000000","message":"If you need to provide another patchset, I suggest you change it to explicit arguments. just for convenience.","commit_id":"f0a1f8feb29fe9e7b4d84b1cb742e9cc20d190d3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    cfg.StrOpt(\u0027ex_peer_patch_port\u0027, default\u003d\u0027patch-int\u0027,"},{"line_number":46,"context_line":"               help\u003d_(\"Peer patch port in external bridge for integration \""},{"line_number":47,"context_line":"                      \"bridge.\")),"},{"line_number":48,"context_line":"    cfg.StrOpt(\u0027send_arp_interval\u0027, default\u003d5,"},{"line_number":49,"context_line":"               help\u003d_(\"Polling interval for arp request in seconds\"))"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_a44f19bc","line":48,"updated":"2016-04-05 17:24:30.000000000","message":"Consider using IntOpt.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a5ffc5567145180702473b3ab545c8fc11361464","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    cfg.StrOpt(\u0027ex_peer_patch_port\u0027, default\u003d\u0027patch-int\u0027,"},{"line_number":46,"context_line":"               help\u003d_(\"Peer patch port in external bridge for integration \""},{"line_number":47,"context_line":"                      \"bridge.\")),"},{"line_number":48,"context_line":"    cfg.StrOpt(\u0027send_arp_interval\u0027, default\u003d5,"},{"line_number":49,"context_line":"               help\u003d_(\"Polling interval for arp request in seconds\"))"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_70bda867","line":48,"in_reply_to":"9a061dce_a44f19bc","updated":"2016-04-06 01:42:06.000000000","message":"Done","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.send_arp_interval \u003d int(cfg.CONF.df_dnat_app.send_arp_interval)"},{"line_number":65,"context_line":"        self.external_networks \u003d collections.defaultdict(int)"},{"line_number":66,"context_line":"        self.external_gateway_mac \u003d collections.defaultdict(str)"},{"line_number":67,"context_line":"        self._init_external_bridge()"},{"line_number":68,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"},{"line_number":69,"context_line":"                self.packet_in_handler)"},{"line_number":70,"context_line":"        self._periodic_send_arp_request()"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_a4ab991c","line":67,"updated":"2016-04-05 17:24:30.000000000","message":"Consider calling _init_external_bridge and _periodic_send_arp_request from switch_features_handler, which is called when the application is \u0027initialised\u0027 rather than when it is constructed.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a5ffc5567145180702473b3ab545c8fc11361464","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.send_arp_interval \u003d int(cfg.CONF.df_dnat_app.send_arp_interval)"},{"line_number":65,"context_line":"        self.external_networks \u003d collections.defaultdict(int)"},{"line_number":66,"context_line":"        self.external_gateway_mac \u003d collections.defaultdict(str)"},{"line_number":67,"context_line":"        self._init_external_bridge()"},{"line_number":68,"context_line":"        self.api.register_table_handler(const.INGRESS_NAT_TABLE,"},{"line_number":69,"context_line":"                self.packet_in_handler)"},{"line_number":70,"context_line":"        self._periodic_send_arp_request()"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_f05ff83e","line":67,"in_reply_to":"9a061dce_a4ab991c","updated":"2016-04-06 01:42:06.000000000","message":"Done","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        \"\"\"Sending the arp request at the configured interval.\"\"\""},{"line_number":74,"context_line":"        while True:"},{"line_number":75,"context_line":"            eventlet.sleep(self.send_arp_interval)"},{"line_number":76,"context_line":"            for k, v in six.iteritems(self.external_gateway_mac):"},{"line_number":77,"context_line":"                fip \u003d None"},{"line_number":78,"context_line":"                # if v is none, then need to get the gw mac"},{"line_number":79,"context_line":"                if v is None:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_bf072080","line":76,"updated":"2016-04-05 17:24:30.000000000","message":"Consider giving k and v more descriptive names, e.g. k -\u003e net_id, v -\u003e mac.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a5ffc5567145180702473b3ab545c8fc11361464","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        \"\"\"Sending the arp request at the configured interval.\"\"\""},{"line_number":74,"context_line":"        while True:"},{"line_number":75,"context_line":"            eventlet.sleep(self.send_arp_interval)"},{"line_number":76,"context_line":"            for k, v in six.iteritems(self.external_gateway_mac):"},{"line_number":77,"context_line":"                fip \u003d None"},{"line_number":78,"context_line":"                # if v is none, then need to get the gw mac"},{"line_number":79,"context_line":"                if v is None:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_d05ab44f","line":76,"in_reply_to":"9a061dce_bf072080","updated":"2016-04-06 01:42:06.000000000","message":"Done","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                self.packet_in_handler)"},{"line_number":70,"context_line":"        self._periodic_send_arp_request()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _send_arp_request_entry(self):"},{"line_number":73,"context_line":"        \"\"\"Sending the arp request at the configured interval.\"\"\""},{"line_number":74,"context_line":"        while True:"},{"line_number":75,"context_line":"            eventlet.sleep(self.send_arp_interval)"},{"line_number":76,"context_line":"            for k, v in six.iteritems(self.external_gateway_mac):"},{"line_number":77,"context_line":"                fip \u003d None"},{"line_number":78,"context_line":"                # if v is none, then need to get the gw mac"},{"line_number":79,"context_line":"                if v is None:"},{"line_number":80,"context_line":"                    fip \u003d self.db_store.get_first_floatingip(k)"},{"line_number":81,"context_line":"                if fip:"},{"line_number":82,"context_line":"                    # request gw arp"},{"line_number":83,"context_line":"                    self._send_gw_arp_request(fip)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _periodic_send_arp_request(self):"},{"line_number":86,"context_line":"        \"\"\"Spawn a thread to periodically check the external gateway.\"\"\""},{"line_number":87,"context_line":"        eventlet.spawn(self._send_arp_request_entry)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _update_external_gateway_mac(self, fips, learning_mac):"},{"line_number":90,"context_line":"        net_id \u003d fips[0].floating_network_id"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_3f9f9051","line":87,"range":{"start_line":72,"start_character":0,"end_line":87,"end_character":52},"updated":"2016-04-05 17:24:30.000000000","message":"Consider using oslo_service.loopingcall.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a5ffc5567145180702473b3ab545c8fc11361464","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                self.packet_in_handler)"},{"line_number":70,"context_line":"        self._periodic_send_arp_request()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _send_arp_request_entry(self):"},{"line_number":73,"context_line":"        \"\"\"Sending the arp request at the configured interval.\"\"\""},{"line_number":74,"context_line":"        while True:"},{"line_number":75,"context_line":"            eventlet.sleep(self.send_arp_interval)"},{"line_number":76,"context_line":"            for k, v in six.iteritems(self.external_gateway_mac):"},{"line_number":77,"context_line":"                fip \u003d None"},{"line_number":78,"context_line":"                # if v is none, then need to get the gw mac"},{"line_number":79,"context_line":"                if v is None:"},{"line_number":80,"context_line":"                    fip \u003d self.db_store.get_first_floatingip(k)"},{"line_number":81,"context_line":"                if fip:"},{"line_number":82,"context_line":"                    # request gw arp"},{"line_number":83,"context_line":"                    self._send_gw_arp_request(fip)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _periodic_send_arp_request(self):"},{"line_number":86,"context_line":"        \"\"\"Spawn a thread to periodically check the external gateway.\"\"\""},{"line_number":87,"context_line":"        eventlet.spawn(self._send_arp_request_entry)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _update_external_gateway_mac(self, fips, learning_mac):"},{"line_number":90,"context_line":"        net_id \u003d fips[0].floating_network_id"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_b358ea33","line":87,"range":{"start_line":72,"start_character":0,"end_line":87,"end_character":52},"in_reply_to":"9a061dce_3f9f9051","updated":"2016-04-06 01:42:06.000000000","message":"I think it\u0027s similar. event if in the original neutron, eventlet is used also.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    def _decrease_external_network_count(self, network_id):"},{"line_number":138,"context_line":"        self.external_networks[network_id] -\u003d 1"},{"line_number":139,"context_line":"        if self.external_networks[network_id] \u003d\u003d 0:"},{"line_number":140,"context_line":"            self.external_networks[network_id]"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _get_external_network_count(self, network_id):"},{"line_number":143,"context_line":"        return self.external_networks[network_id]"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_bfbf205f","line":140,"updated":"2016-04-05 17:24:30.000000000","message":"This line is a no-op.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a5ffc5567145180702473b3ab545c8fc11361464","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    def _decrease_external_network_count(self, network_id):"},{"line_number":138,"context_line":"        self.external_networks[network_id] -\u003d 1"},{"line_number":139,"context_line":"        if self.external_networks[network_id] \u003d\u003d 0:"},{"line_number":140,"context_line":"            self.external_networks[network_id]"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _get_external_network_count(self, network_id):"},{"line_number":143,"context_line":"        return self.external_networks[network_id]"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_135f160f","line":140,"in_reply_to":"9a061dce_bfbf205f","updated":"2016-04-06 01:42:06.000000000","message":"Done","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"}],"dragonflow/controller/ryu_base_app.py":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"0b6a3e048221f0be5dddab55690f7bd88dca08d7","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    OFP_VERSIONS \u003d [ofproto_v1_3.OFP_VERSION]"},{"line_number":37,"context_line":"    OF_AUTO_PORT_DESC_STATS_REQ_VER \u003d 0x04"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, **kwargs):"},{"line_number":40,"context_line":"        super(RyuDFAdapter, self).__init__(**kwargs)"},{"line_number":41,"context_line":"        self.dispatcher \u003d AppDispatcher(\u0027dragonflow.controller\u0027,"},{"line_number":42,"context_line":"                cfg.CONF.df.apps_list)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_8c910af4","line":39,"range":{"start_line":39,"start_character":25,"end_line":39,"end_character":31},"updated":"2016-03-18 03:25:43.000000000","message":"why change this interface? I don\u0027t think kwargs is better. It hides all the details passed in. Other developers need to investigate which argument is there, which argument is not there.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"c70ccd637572189fbd0d6e61a22369e75e6b4999","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    OFP_VERSIONS \u003d [ofproto_v1_3.OFP_VERSION]"},{"line_number":37,"context_line":"    OF_AUTO_PORT_DESC_STATS_REQ_VER \u003d 0x04"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, **kwargs):"},{"line_number":40,"context_line":"        super(RyuDFAdapter, self).__init__(**kwargs)"},{"line_number":41,"context_line":"        self.dispatcher \u003d AppDispatcher(\u0027dragonflow.controller\u0027,"},{"line_number":42,"context_line":"                cfg.CONF.df.apps_list)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_1d940241","line":39,"range":{"start_line":39,"start_character":25,"end_line":39,"end_character":31},"in_reply_to":"1af94dfe_8c910af4","updated":"2016-03-18 04:50:29.000000000","message":"will do. the new patch will pass the arguments explicitly.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            floatingip[col] \u003d val"},{"line_number":458,"context_line":"        floatingip_json \u003d jsonutils.dumps(floatingip)"},{"line_number":459,"context_line":"        self.driver.create_key(\u0027floatingip\u0027, name, floatingip_json)"},{"line_number":460,"context_line":"        if floatingip.get(\u0027port_id\u0027, None) is not None:"},{"line_number":461,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027create\u0027,"},{"line_number":462,"context_line":"                                       floatingip_json)"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_d2035275","line":460,"updated":"2016-03-07 10:12:39.000000000","message":"Consider testing with:\nif \u0027port_id\u0027 in floatingip:","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            floatingip[col] \u003d val"},{"line_number":458,"context_line":"        floatingip_json \u003d jsonutils.dumps(floatingip)"},{"line_number":459,"context_line":"        self.driver.create_key(\u0027floatingip\u0027, name, floatingip_json)"},{"line_number":460,"context_line":"        if floatingip.get(\u0027port_id\u0027, None) is not None:"},{"line_number":461,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027create\u0027,"},{"line_number":462,"context_line":"                                       floatingip_json)"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_17ef2788","line":460,"in_reply_to":"5aef4532_d2035275","updated":"2016-03-08 12:11:18.000000000","message":"Here is to check the port_id value but not the key. when a floatingip get created, there are two cases. 1. fip assoicates with a port. the \u0027port_id\u0027 attribute is there, and the value is not None. 2. fip doesn\u0027t assoicate with a port. the \u0027port_id\u0027 attribute is there also, but the value is None.\n\nIf we don\u0027t check the port_id value here, then we have to check it on the plugin. Either db or plugin need to check the value.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":464,"context_line":"    def delete_floatingip(self, name):"},{"line_number":465,"context_line":"        floatingip \u003d self.driver.get_key(\u0027floatingip\u0027, name)"},{"line_number":466,"context_line":"        fip_dict \u003d jsonutils.loads(floatingip)"},{"line_number":467,"context_line":"        if fip_dict.get(\u0027port_id\u0027, None) is not None:"},{"line_number":468,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027set\u0027, name)"},{"line_number":469,"context_line":"        self.driver.delete_key(\u0027floatingip\u0027, name)"},{"line_number":470,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_72efdeb0","line":467,"updated":"2016-03-07 10:12:39.000000000","message":"Same here, re: testing key in dict.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":775,"context_line":"    def floating_port_id(self):"},{"line_number":776,"context_line":"        return self.floatingip[\u0027floating_port_id\u0027]"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"#    @property"},{"line_number":779,"context_line":"#    def network_segmentation_id(self):"},{"line_number":780,"context_line":"#        return self.floatingip[\u0027network_segmentation_id\u0027]"},{"line_number":781,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_323c362f","line":778,"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing this comment.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":775,"context_line":"    def floating_port_id(self):"},{"line_number":776,"context_line":"        return self.floatingip[\u0027floating_port_id\u0027]"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"#    @property"},{"line_number":779,"context_line":"#    def network_segmentation_id(self):"},{"line_number":780,"context_line":"#        return self.floatingip[\u0027network_segmentation_id\u0027]"},{"line_number":781,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_37ece38e","line":778,"in_reply_to":"5aef4532_323c362f","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"86c2986e2feafe151e90cbda2a11af30fa40af4e","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027create\u0027,"},{"line_number":478,"context_line":"                                       floatingip_json, topic)"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def delete_floatingip(self, name, topic):"},{"line_number":481,"context_line":"        floatingip \u003d self.driver.get_key(\u0027floatingip\u0027, name, topic)"},{"line_number":482,"context_line":"        fip_dict \u003d jsonutils.loads(floatingip)"},{"line_number":483,"context_line":"        if fip_dict.get(\u0027port_id\u0027, None) is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_3514a29e","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":25},"updated":"2016-03-15 07:36:37.000000000","message":"Why did you remove the notification for  fip delete ?\n_send_db_change_event(","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"c70ccd637572189fbd0d6e61a22369e75e6b4999","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027create\u0027,"},{"line_number":478,"context_line":"                                       floatingip_json, topic)"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def delete_floatingip(self, name, topic):"},{"line_number":481,"context_line":"        floatingip \u003d self.driver.get_key(\u0027floatingip\u0027, name, topic)"},{"line_number":482,"context_line":"        fip_dict \u003d jsonutils.loads(floatingip)"},{"line_number":483,"context_line":"        if fip_dict.get(\u0027port_id\u0027, None) is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_9dbc92bc","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":25},"in_reply_to":"1af94dfe_5144bbb5","updated":"2016-03-18 04:50:29.000000000","message":"If an associated floatingip get deleted, the local controller which the associated vm on the same node will remove the DNAT ovs flow rules. and then neutron-server delete the record from df db.\n\nif this floatingip has not associated port, then just delete the record from df db.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"413759da6d6ec98a81025009a91ddb439373aac5","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027create\u0027,"},{"line_number":478,"context_line":"                                       floatingip_json, topic)"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def delete_floatingip(self, name, topic):"},{"line_number":481,"context_line":"        floatingip \u003d self.driver.get_key(\u0027floatingip\u0027, name, topic)"},{"line_number":482,"context_line":"        fip_dict \u003d jsonutils.loads(floatingip)"},{"line_number":483,"context_line":"        if fip_dict.get(\u0027port_id\u0027, None) is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afc51ec_b6f8b5c4","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":25},"in_reply_to":"3afc51ec_3514a29e","updated":"2016-03-15 10:01:26.000000000","message":"Because if a fip get created without associated with a port. the fip no need to be notified to df controller to do the process. Just save to db.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"0b6a3e048221f0be5dddab55690f7bd88dca08d7","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027create\u0027,"},{"line_number":478,"context_line":"                                       floatingip_json, topic)"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def delete_floatingip(self, name, topic):"},{"line_number":481,"context_line":"        floatingip \u003d self.driver.get_key(\u0027floatingip\u0027, name, topic)"},{"line_number":482,"context_line":"        fip_dict \u003d jsonutils.loads(floatingip)"},{"line_number":483,"context_line":"        if fip_dict.get(\u0027port_id\u0027, None) is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_5144bbb5","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":25},"in_reply_to":"3afc51ec_b6f8b5c4","updated":"2016-03-18 03:25:43.000000000","message":"What if the user wanna delete an associated floating-ip?","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":798,"context_line":"    def __init__(self, value):"},{"line_number":799,"context_line":"        self.floatingip \u003d jsonutils.loads(value)"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"    @property"},{"line_number":802,"context_line":"    def name(self):"},{"line_number":803,"context_line":"        return self.floatingip[\u0027name\u0027]"},{"line_number":804,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_944edcbf","line":801,"updated":"2016-03-20 19:27:25.000000000","message":"Why make this API change to Floatingip? It also makes it different from all other database objects.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":798,"context_line":"    def __init__(self, value):"},{"line_number":799,"context_line":"        self.floatingip \u003d jsonutils.loads(value)"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"    @property"},{"line_number":802,"context_line":"    def name(self):"},{"line_number":803,"context_line":"        return self.floatingip[\u0027name\u0027]"},{"line_number":804,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_d03b399b","line":801,"in_reply_to":"fa0719c6_944edcbf","updated":"2016-03-21 07:30:14.000000000","message":"At present, external modules just query floatingip and no need to configure it. If we use @property to instead get_xxx subroutine which will make reading easier. If later there need new functions such as set_xxxx, then set_xxx will be used.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        floatingip_json \u003d jsonutils.dumps(floatingip)"},{"line_number":526,"context_line":"        self.driver.set_key(\u0027floatingip\u0027, name, floatingip_json,"},{"line_number":527,"context_line":"                            floatingip[\u0027topic\u0027])"},{"line_number":528,"context_line":"        if notify is True:"},{"line_number":529,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027set\u0027,"},{"line_number":530,"context_line":"                floatingip_json, floatingip[\u0027topic\u0027])"},{"line_number":531,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_fb47eb1a","line":528,"updated":"2016-04-05 17:24:30.000000000","message":"Cosmetic: This can be written as:\n\"if notify:\"","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a5ffc5567145180702473b3ab545c8fc11361464","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        floatingip_json \u003d jsonutils.dumps(floatingip)"},{"line_number":526,"context_line":"        self.driver.set_key(\u0027floatingip\u0027, name, floatingip_json,"},{"line_number":527,"context_line":"                            floatingip[\u0027topic\u0027])"},{"line_number":528,"context_line":"        if notify is True:"},{"line_number":529,"context_line":"            self._send_db_change_event(\u0027floatingip\u0027, name, \u0027set\u0027,"},{"line_number":530,"context_line":"                floatingip_json, floatingip[\u0027topic\u0027])"},{"line_number":531,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_3095f0dd","line":528,"in_reply_to":"9a061dce_fb47eb1a","updated":"2016-04-06 01:42:06.000000000","message":"will do","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"}],"dragonflow/db/db_store.py":[{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"14773eab97d5740555a71fed19623b96dfad64b1","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        if lswitch.is_external() is not True:"},{"line_number":251,"context_line":"            return fip_return"},{"line_number":252,"context_line":"        network_id \u003d lswitch.get_id()"},{"line_number":253,"context_line":"        for fip in self.get_floatingips(topic):"},{"line_number":254,"context_line":"            if fip.floating_network_id \u003d\u003d network_id:"},{"line_number":255,"context_line":"                update_fip \u003d self.update_floatingip_gateway("},{"line_number":256,"context_line":"                    fip, lswitch)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a061dce_6e9fb750","line":253,"updated":"2016-04-05 10:57:23.000000000","message":"In my test: public network is in admin tenant\nsubnets are in demo tenant, floating ips are in demo tenant.\n\nAs a result it does not work.\n\nThis works for me here:\nfor fip in self.get_floatingips():","commit_id":"8aac5a96b638151a51328287787009495eabef4f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"1e8ff312dba6ed5017f1e36a9107b314abd2e135","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        if lswitch.is_external() is not True:"},{"line_number":251,"context_line":"            return fip_return"},{"line_number":252,"context_line":"        network_id \u003d lswitch.get_id()"},{"line_number":253,"context_line":"        for fip in self.get_floatingips(topic):"},{"line_number":254,"context_line":"            if fip.floating_network_id \u003d\u003d network_id:"},{"line_number":255,"context_line":"                update_fip \u003d self.update_floatingip_gateway("},{"line_number":256,"context_line":"                    fip, lswitch)"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a061dce_7d2638cf","line":253,"in_reply_to":"9a061dce_6e9fb750","updated":"2016-04-05 15:45:13.000000000","message":"will do. without tenant topic query.","commit_id":"8aac5a96b638151a51328287787009495eabef4f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                return fip"},{"line_number":240,"context_line":"        return None"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def get_floatingip_by_gateway(self, ip, topic\u003dNone):"},{"line_number":243,"context_line":"        fip_return \u003d []"},{"line_number":244,"context_line":"        for fip in self.get_floatingips(topic):"},{"line_number":245,"context_line":"            if fip.external_gateway_ip \u003d\u003d ip:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_5b0537ba","line":242,"updated":"2016-04-05 17:24:30.000000000","message":"Consider renaming: get_floatingips_by_gateway, since it now returns a list.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"23b2e53b9b87844119fcccf8bda7f2dae77decc9","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                return fip"},{"line_number":240,"context_line":"        return None"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def get_floatingip_by_gateway(self, ip, topic\u003dNone):"},{"line_number":243,"context_line":"        fip_return \u003d []"},{"line_number":244,"context_line":"        for fip in self.get_floatingips(topic):"},{"line_number":245,"context_line":"            if fip.external_gateway_ip \u003d\u003d ip:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_73b772d8","line":242,"in_reply_to":"9a061dce_5b0537ba","updated":"2016-04-06 02:08:23.000000000","message":"Done","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                fip_return.append(fip)"},{"line_number":247,"context_line":"        return fip_return"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def check_and_update_floatingip(self, lswitch, topic\u003dNone):"},{"line_number":250,"context_line":"        fip_return \u003d []"},{"line_number":251,"context_line":"        if lswitch.is_external() is not True:"},{"line_number":252,"context_line":"            return fip_return"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_7be11bd0","line":249,"updated":"2016-04-05 17:24:30.000000000","message":"Consider renaming to plural: check_and_update_floatingips.","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"23b2e53b9b87844119fcccf8bda7f2dae77decc9","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                fip_return.append(fip)"},{"line_number":247,"context_line":"        return fip_return"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def check_and_update_floatingip(self, lswitch, topic\u003dNone):"},{"line_number":250,"context_line":"        fip_return \u003d []"},{"line_number":251,"context_line":"        if lswitch.is_external() is not True:"},{"line_number":252,"context_line":"            return fip_return"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_13aa7670","line":249,"in_reply_to":"9a061dce_7be11bd0","updated":"2016-04-06 02:08:23.000000000","message":"Done","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"cc9c887db856b84c17f55bdf2f1025cd9cc73637","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def check_and_update_floatingip(self, lswitch, topic\u003dNone):"},{"line_number":250,"context_line":"        fip_return \u003d []"},{"line_number":251,"context_line":"        if lswitch.is_external() is not True:"},{"line_number":252,"context_line":"            return fip_return"},{"line_number":253,"context_line":"        network_id \u003d lswitch.get_id()"},{"line_number":254,"context_line":"        for fip in self.get_floatingips(topic):"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_9b906f45","line":251,"updated":"2016-04-05 17:24:30.000000000","message":"Cosmetic: Can be rewritten as:\n\"if not lswitch.is_external():\"","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"23b2e53b9b87844119fcccf8bda7f2dae77decc9","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def check_and_update_floatingip(self, lswitch, topic\u003dNone):"},{"line_number":250,"context_line":"        fip_return \u003d []"},{"line_number":251,"context_line":"        if lswitch.is_external() is not True:"},{"line_number":252,"context_line":"            return fip_return"},{"line_number":253,"context_line":"        network_id \u003d lswitch.get_id()"},{"line_number":254,"context_line":"        for fip in self.get_floatingips(topic):"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_33afba82","line":251,"in_reply_to":"9a061dce_9b906f45","updated":"2016-04-06 02:08:23.000000000","message":"Done","commit_id":"6c5adc11df88a2a767ba626fa4cac529a6cc624f"}],"dragonflow/db/drivers/ovsdb_vswitch_impl.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.idl \u003d self.ovsdb.idl"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @property"},{"line_number":47,"context_line":"    def _tables(self):"},{"line_number":48,"context_line":"        return self.idl.tables"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def transaction(self, check_error\u003dFalse, log_errors\u003dTrue, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_72a7de4f","line":47,"updated":"2016-03-07 10:12:39.000000000","message":"This property isn\u0027t private. Consider renaming to \u0027tables\u0027 or get_tables (not as a property).","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.idl \u003d self.ovsdb.idl"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @property"},{"line_number":47,"context_line":"    def _tables(self):"},{"line_number":48,"context_line":"        return self.idl.tables"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def transaction(self, check_error\u003dFalse, log_errors\u003dTrue, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_329cf1bf","line":47,"in_reply_to":"5aef4532_72a7de4f","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"0b6a3e048221f0be5dddab55690f7bd88dca08d7","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return self.get_patch_port_ofport(port)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_patch_port(self, bridge, port):"},{"line_number":140,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"},{"line_number":141,"context_line":"            return"},{"line_number":142,"context_line":"        else:"},{"line_number":143,"context_line":"            commands.DelPortCommand(self, port, bridge,"},{"line_number":144,"context_line":"                                    if_exists\u003dTrue).execute()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def patch_port_exist(self, port):"},{"line_number":147,"context_line":"        cmd \u003d commands.DbGetCommand(self, \u0027Interface\u0027, port, \u0027type\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_cc4b1286","line":144,"range":{"start_line":140,"start_character":8,"end_line":144,"end_character":61},"updated":"2016-03-18 03:25:43.000000000","message":"if commands.BridgeExistsCommand:\n    commands.DelPortCommand...\n\nIt seems much clearer.","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"c70ccd637572189fbd0d6e61a22369e75e6b4999","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return self.get_patch_port_ofport(port)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def delete_patch_port(self, bridge, port):"},{"line_number":140,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"},{"line_number":141,"context_line":"            return"},{"line_number":142,"context_line":"        else:"},{"line_number":143,"context_line":"            commands.DelPortCommand(self, port, bridge,"},{"line_number":144,"context_line":"                                    if_exists\u003dTrue).execute()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def patch_port_exist(self, port):"},{"line_number":147,"context_line":"        cmd \u003d commands.DbGetCommand(self, \u0027Interface\u0027, port, \u0027type\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_bddeae0e","line":144,"range":{"start_line":140,"start_character":8,"end_line":144,"end_character":61},"in_reply_to":"1af94dfe_cc4b1286","updated":"2016-03-18 04:50:29.000000000","message":"yes, will do","commit_id":"0ff64f2ea52114d9439c6941499cf1da5e50199d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        return chassis_to_ofport, lport_to_ofport"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"},{"line_number":149,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"},{"line_number":150,"context_line":"            commands.AddBridgeCommand(self, bridge, True,"},{"line_number":151,"context_line":"                                      datapath_type\u003d\u0027system\u0027).execute()"},{"line_number":152,"context_line":"            AddPatchPort(self, bridge, port, remote_name).execute()"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_d4c69415","line":149,"updated":"2016-03-20 19:27:25.000000000","message":"Consider creating method is_bridge_exists (like patch_port_exists).","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        return chassis_to_ofport, lport_to_ofport"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def create_patch_port(self, bridge, port, remote_name):"},{"line_number":149,"context_line":"        if not commands.BridgeExistsCommand(self, bridge).execute():"},{"line_number":150,"context_line":"            commands.AddBridgeCommand(self, bridge, True,"},{"line_number":151,"context_line":"                                      datapath_type\u003d\u0027system\u0027).execute()"},{"line_number":152,"context_line":"            AddPatchPort(self, bridge, port, remote_name).execute()"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_501d690e","line":149,"in_reply_to":"fa0719c6_d4c69415","updated":"2016-03-21 07:30:14.000000000","message":"We have implemented ovsdb operation lib based on the Neutron ovsdb native library, Why don\u0027t we re-use the original lib asap:)","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"2de8f304f46e052534227052feb0457a6279b4aa","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        return self.idl.tables"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @property"},{"line_number":70,"context_line":"    def _ovs(self):"},{"line_number":71,"context_line":"        return list(self._tables[\u0027Open_vSwitch\u0027].rows.values())[0]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def transaction(self, check_error\u003dFalse, log_errors\u003dTrue, **kwargs):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_d582e0ff","line":70,"updated":"2016-03-29 14:04:08.000000000","message":"Where is this private property used?","commit_id":"faa13c73b30e931fa7a9655a4c6bead5d1ddd321"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dfd08c588fc980836f47a1e26917d2aea651c01a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        return self.idl.tables"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @property"},{"line_number":70,"context_line":"    def _ovs(self):"},{"line_number":71,"context_line":"        return list(self._tables[\u0027Open_vSwitch\u0027].rows.values())[0]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def transaction(self, check_error\u003dFalse, log_errors\u003dTrue, **kwargs):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a061dce_bb48d388","line":70,"in_reply_to":"ba0121b8_46fa8cbe","updated":"2016-04-05 17:24:14.000000000","message":"I see. Thanks.","commit_id":"faa13c73b30e931fa7a9655a4c6bead5d1ddd321"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"c189326b6090eb74b8c0f6e431686e9a8b8283ec","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        return self.idl.tables"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @property"},{"line_number":70,"context_line":"    def _ovs(self):"},{"line_number":71,"context_line":"        return list(self._tables[\u0027Open_vSwitch\u0027].rows.values())[0]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def transaction(self, check_error\u003dFalse, log_errors\u003dTrue, **kwargs):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_46fa8cbe","line":70,"in_reply_to":"ba0121b8_d582e0ff","updated":"2016-03-30 01:21:00.000000000","message":"I re-use some of the objects in neutron/agent/ovsdb/native/command.py, they depend on _tables, _ovs routines which is defined only in neutron/agent/ovsdb/native/impl_idl.py, so I add the new property. Otherwise, we have to re-use the original functions of Neutron and have to overwrite it again.","commit_id":"faa13c73b30e931fa7a9655a4c6bead5d1ddd321"}],"dragonflow/neutron/agent/l3/df_router.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class DfDvrRouter(legacy_router.LegacyRouter):"},{"line_number":21,"context_line":"    def add_floating_ip(self, fip, interface_name, device):"},{"line_number":22,"context_line":"        if self.router.get(\u0027distributed\u0027, False):"},{"line_number":23,"context_line":"            return"},{"line_number":24,"context_line":"        return super(DfDvrRouter, self).add_floating_ip("},{"line_number":25,"context_line":"            fip, interface_name, device)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_86522bdc","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":49},"updated":"2016-03-07 10:12:39.000000000","message":"This test repeats a few times. Consider moving \u0027self.router.get(...)\u0027 to a method.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class DfDvrRouter(legacy_router.LegacyRouter):"},{"line_number":21,"context_line":"    def add_floating_ip(self, fip, interface_name, device):"},{"line_number":22,"context_line":"        if self.router.get(\u0027distributed\u0027, False):"},{"line_number":23,"context_line":"            return"},{"line_number":24,"context_line":"        return super(DfDvrRouter, self).add_floating_ip("},{"line_number":25,"context_line":"            fip, interface_name, device)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_32d4f11e","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":49},"in_reply_to":"5aef4532_86522bdc","updated":"2016-03-08 12:11:18.000000000","message":"ok, will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"}],"dragonflow/neutron/plugin.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":719,"context_line":"        return None"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    def _get_floatingip_port(self, context, floatingip_id):"},{"line_number":722,"context_line":"        filters \u003d dict(device_id\u003d[floatingip_id])"},{"line_number":723,"context_line":"        floating_ports \u003d self.get_ports(context, filters\u003dfilters)"},{"line_number":724,"context_line":"        if floating_ports:"},{"line_number":725,"context_line":"            return floating_ports[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_26ab578b","line":722,"updated":"2016-03-07 10:12:39.000000000","message":"Consider using literal dictionary construction, e.g. {\u0027device_id\u0027: [floatingip_id]}","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":719,"context_line":"        return None"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    def _get_floatingip_port(self, context, floatingip_id):"},{"line_number":722,"context_line":"        filters \u003d dict(device_id\u003d[floatingip_id])"},{"line_number":723,"context_line":"        floating_ports \u003d self.get_ports(context, filters\u003dfilters)"},{"line_number":724,"context_line":"        if floating_ports:"},{"line_number":725,"context_line":"            return floating_ports[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_f2e609b3","line":722,"in_reply_to":"5aef4532_26ab578b","updated":"2016-03-08 12:11:18.000000000","message":"ok","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":750,"context_line":"                raise n_exc.SubnetNotFound("},{"line_number":751,"context_line":"                    subnet_id\u003dsubnet_id)"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":"            # network \u003d self.get_network("},{"line_number":754,"context_line":"            #    context, floatingip_dict[\u0027floating_network_id\u0027])"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"            self.nb_api.create_floatingip("}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_c6ba73c0","line":753,"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing comment.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":750,"context_line":"                raise n_exc.SubnetNotFound("},{"line_number":751,"context_line":"                    subnet_id\u003dsubnet_id)"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":"            # network \u003d self.get_network("},{"line_number":754,"context_line":"            #    context, floatingip_dict[\u0027floating_network_id\u0027])"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"            self.nb_api.create_floatingip("}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_9208652f","line":753,"in_reply_to":"5aef4532_c6ba73c0","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b283d07bcbea2115698f034d2ffec4edb4a7d4e3","unresolved":false,"context_lines":[{"line_number":761,"context_line":"                port_id\u003dfloatingip_dict[\u0027port_id\u0027],"},{"line_number":762,"context_line":"                fixed_ip_address\u003dfloatingip_dict[\u0027fixed_ip_address\u0027],"},{"line_number":763,"context_line":"                status\u003dfloatingip_dict[\u0027status\u0027],"},{"line_number":764,"context_line":"                # network_segmentation_id\u003dnetwork[\u0027provider:segmentation_id\u0027],"},{"line_number":765,"context_line":"                floating_port_id\u003dfloatingip_port[\u0027id\u0027],"},{"line_number":766,"context_line":"                floating_mac_address\u003dfloatingip_port[\u0027mac_address\u0027],"},{"line_number":767,"context_line":"                external_gateway_ip\u003dfloatingip_subnet[\u0027gateway_ip\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_66ca7f51","line":764,"updated":"2016-03-07 10:12:39.000000000","message":"Consider removing comment.","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"5e9a0fff07031e9b16914115739c3221855982c9","unresolved":false,"context_lines":[{"line_number":761,"context_line":"                port_id\u003dfloatingip_dict[\u0027port_id\u0027],"},{"line_number":762,"context_line":"                fixed_ip_address\u003dfloatingip_dict[\u0027fixed_ip_address\u0027],"},{"line_number":763,"context_line":"                status\u003dfloatingip_dict[\u0027status\u0027],"},{"line_number":764,"context_line":"                # network_segmentation_id\u003dnetwork[\u0027provider:segmentation_id\u0027],"},{"line_number":765,"context_line":"                floating_port_id\u003dfloatingip_port[\u0027id\u0027],"},{"line_number":766,"context_line":"                floating_mac_address\u003dfloatingip_port[\u0027mac_address\u0027],"},{"line_number":767,"context_line":"                external_gateway_ip\u003dfloatingip_subnet[\u0027gateway_ip\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_f207291a","line":764,"in_reply_to":"5aef4532_66ca7f51","updated":"2016-03-08 12:11:18.000000000","message":"will do","commit_id":"4a2b93fd9edb4f513225f57e5429baa81a22b7d5"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"6e55dfa745cdb78dac5c5f53f5e385e190f2cbff","unresolved":false,"context_lines":[{"line_number":834,"context_line":"                port_id\u003dfloatingip_dict[\u0027port_id\u0027],"},{"line_number":835,"context_line":"                fixed_ip_address\u003dfloatingip_dict[\u0027fixed_ip_address\u0027],"},{"line_number":836,"context_line":"                status\u003dfloatingip_dict[\u0027status\u0027],"},{"line_number":837,"context_line":"                floating_port_id\u003dfloatingip_port[\u0027id\u0027],"},{"line_number":838,"context_line":"                floating_mac_address\u003dfloatingip_port[\u0027mac_address\u0027],"},{"line_number":839,"context_line":"                external_gateway_ip\u003dfloatingip_subnet[\u0027gateway_ip\u0027],"},{"line_number":840,"context_line":"                external_cidr\u003dfloatingip_subnet[\u0027cidr\u0027])"},{"line_number":841,"context_line":""},{"line_number":842,"context_line":"        return floatingip_dict"},{"line_number":843,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a061dce_016249ad","line":840,"range":{"start_line":837,"start_character":0,"end_line":840,"end_character":56},"updated":"2016-04-05 12:33:10.000000000","message":"Do you really need to save these info in the floatingip record in dragonflow ?\n\nYou have it in the external subnet record.","commit_id":"8aac5a96b638151a51328287787009495eabef4f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"1e8ff312dba6ed5017f1e36a9107b314abd2e135","unresolved":false,"context_lines":[{"line_number":834,"context_line":"                port_id\u003dfloatingip_dict[\u0027port_id\u0027],"},{"line_number":835,"context_line":"                fixed_ip_address\u003dfloatingip_dict[\u0027fixed_ip_address\u0027],"},{"line_number":836,"context_line":"                status\u003dfloatingip_dict[\u0027status\u0027],"},{"line_number":837,"context_line":"                floating_port_id\u003dfloatingip_port[\u0027id\u0027],"},{"line_number":838,"context_line":"                floating_mac_address\u003dfloatingip_port[\u0027mac_address\u0027],"},{"line_number":839,"context_line":"                external_gateway_ip\u003dfloatingip_subnet[\u0027gateway_ip\u0027],"},{"line_number":840,"context_line":"                external_cidr\u003dfloatingip_subnet[\u0027cidr\u0027])"},{"line_number":841,"context_line":""},{"line_number":842,"context_line":"        return floatingip_dict"},{"line_number":843,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"9a061dce_105c43ec","line":840,"range":{"start_line":837,"start_character":0,"end_line":840,"end_character":56},"in_reply_to":"9a061dce_016249ad","updated":"2016-04-05 15:45:13.000000000","message":"yes. fip need these info. Otherwise dnat app have to query these df-db tables every time. So there are different advantage and disadvange. At present I think it\u0027s better to record these info in fip table.","commit_id":"8aac5a96b638151a51328287787009495eabef4f"}],"dragonflow/tests/fullstack/test_objects.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a832cd651daf341e315c7d0912363a773f812155","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            return True"},{"line_number":334,"context_line":"        return False"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def _wait_for_fip_active(self, timeout):"},{"line_number":337,"context_line":"        fip \u003d self.get_floatingip()"},{"line_number":338,"context_line":"        if fip is None:"},{"line_number":339,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afc51ec_484c7e70","line":336,"updated":"2016-03-13 21:14:32.000000000","message":"Why not use wait_until_true?","commit_id":"3793a07c7269f3b32da272c44d28321f729539c1"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"48c70806e052db6409e60be8380cb2c1d176eb71","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            return True"},{"line_number":334,"context_line":"        return False"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    def _wait_for_fip_active(self, timeout):"},{"line_number":337,"context_line":"        fip \u003d self.get_floatingip()"},{"line_number":338,"context_line":"        if fip is None:"},{"line_number":339,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afc51ec_575a5651","line":336,"in_reply_to":"3afc51ec_484c7e70","updated":"2016-03-14 03:17:36.000000000","message":"will do","commit_id":"3793a07c7269f3b32da272c44d28321f729539c1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        fip \u003d self.get_floatingip()"},{"line_number":338,"context_line":"        if fip is None:"},{"line_number":339,"context_line":"            return False"},{"line_number":340,"context_line":"        while timeout \u003e 0:"},{"line_number":341,"context_line":"            fip \u003d self.get_floatingip()"},{"line_number":342,"context_line":"            if fip.status \u003d\u003d \u0027ACTIVE\u0027:"},{"line_number":343,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_34d8b0ef","line":340,"updated":"2016-03-20 19:27:25.000000000","message":"Why not use wait_until_true?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        fip \u003d self.get_floatingip()"},{"line_number":338,"context_line":"        if fip is None:"},{"line_number":339,"context_line":"            return False"},{"line_number":340,"context_line":"        while timeout \u003e 0:"},{"line_number":341,"context_line":"            fip \u003d self.get_floatingip()"},{"line_number":342,"context_line":"            if fip.status \u003d\u003d \u0027ACTIVE\u0027:"},{"line_number":343,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_d0a5f9b5","line":340,"in_reply_to":"fa0719c6_34d8b0ef","updated":"2016-03-21 07:30:14.000000000","message":"will do","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"}],"dragonflow/tests/unit/test_controller.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        dispatcher.AppDispatcher \u003d mock.Mock()"},{"line_number":27,"context_line":"        db_store.DbStore \u003d mock.Mock()"},{"line_number":28,"context_line":"        cfg.CONF \u003d mock.Mock()"},{"line_number":29,"context_line":"        self.controller \u003d mock.Mock()"},{"line_number":30,"context_line":"        self.controller.nb_api \u003d mock.Mock()"},{"line_number":31,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_d4edf48f","line":29,"updated":"2016-03-20 19:27:25.000000000","message":"What is this change trying to fix?","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        dispatcher.AppDispatcher \u003d mock.Mock()"},{"line_number":27,"context_line":"        db_store.DbStore \u003d mock.Mock()"},{"line_number":28,"context_line":"        cfg.CONF \u003d mock.Mock()"},{"line_number":29,"context_line":"        self.controller \u003d mock.Mock()"},{"line_number":30,"context_line":"        self.controller.nb_api \u003d mock.Mock()"},{"line_number":31,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_101131ad","line":29,"in_reply_to":"fa0719c6_d4edf48f","updated":"2016-03-21 07:30:14.000000000","message":"In order to get api_nb, ovsdb objects in DF App, I move api_nb and ovsdb initialization into the DfLocalController initialization but not run routine, it will get some cfg.CONF items to create api_nb and ovsdb instance. and it will report some error if no further mock. Now I do a simple process, and later anybody can set a stub.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"}],"dragonflow/tests/unit/test_ryu_base_app.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"da5bb8bfe4f4c55b10a702afb539210ec1c2eb4e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def setUp(self):"},{"line_number":32,"context_line":"        super(TestRyuDFAdapter, self).setUp()"},{"line_number":33,"context_line":"        self.db_store \u003d mock.Mock()"},{"line_number":34,"context_line":"        cfg.CONF \u003d mock.Mock()"},{"line_number":35,"context_line":"        self.ryu_df_adapter \u003d RyuDFAdapter(db_store\u003dself.db_store)"},{"line_number":36,"context_line":"        self.mock_app \u003d mock.Mock(spec\u003d["},{"line_number":37,"context_line":"                \u0027update_logical_switch\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_74e228a1","line":34,"updated":"2016-03-20 19:27:25.000000000","message":"I think this may cause issues with other tests.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a6ac4345a20b9420acb2885bc3948e4acc3e5065","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def setUp(self):"},{"line_number":32,"context_line":"        super(TestRyuDFAdapter, self).setUp()"},{"line_number":33,"context_line":"        self.db_store \u003d mock.Mock()"},{"line_number":34,"context_line":"        cfg.CONF \u003d mock.Mock()"},{"line_number":35,"context_line":"        self.ryu_df_adapter \u003d RyuDFAdapter(db_store\u003dself.db_store)"},{"line_number":36,"context_line":"        self.mock_app \u003d mock.Mock(spec\u003d["},{"line_number":37,"context_line":"                \u0027update_logical_switch\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_d0cb391d","line":34,"in_reply_to":"fa0719c6_74e228a1","updated":"2016-03-21 07:30:14.000000000","message":"Do you have other good method to make sure current test case pass:), A resolving method is welcome:). In my local setup, if without a stub, some unit case is failed.","commit_id":"894405dc1c90a14e84cb2a2a53fedacbeb453353"}]}
