)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e322923e87ec2e6256cef946b4827716e61c9e86","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-04-24 16:06:32 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Migrate lport to NB models"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I6fd564f503177ad24a9be3eaa1c4b997f1e37241"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5ff73747_15cb6c72","line":8,"updated":"2017-04-25 11:21:47.000000000","message":"Partially-Implements: blueprint refactor-nb-api","commit_id":"796dd00b05de63fc8400de6c270f206453b9c2dd"}],"dragonflow/controller/classifier_app.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"cca9863ec2c82c139407b1ee390648a1f81b0bfd","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_log import log"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from dragonflow.controller.common import constants as const"},{"line_number":19,"context_line":"from dragonflow.controller import df_base_app"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_ca66a452","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":24},"updated":"2017-05-15 12:26:16.000000000","message":"this is not related to patch","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"09273982d699db40df038f6752232078e9c16f5a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_log import log"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from dragonflow.controller.common import constants as const"},{"line_number":19,"context_line":"from dragonflow.controller import df_base_app"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_0b2d9742","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":24},"in_reply_to":"1f013ff3_ca66a452","updated":"2017-05-16 06:52:43.000000000","message":"True. Will move.","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ab0774f7d234d09c5f0faf8a3c3a07b3d1e5a556","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        chassis \u003d lport.get_chassis()"},{"line_number":301,"context_line":"        if chassis \u003d\u003d self.chassis_name:"},{"line_number":302,"context_line":"            lport.set_external_value(\u0027is_local\u0027, True)"},{"line_number":303,"context_line":"            self.db_store.set_port(lport.get_id(), lport, True)"},{"line_number":304,"context_line":"            ofport \u003d self.vswitch_api.get_port_ofport_by_id(lport.get_id())"},{"line_number":305,"context_line":"            if ofport:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_2396984c","line":302,"range":{"start_line":302,"start_character":12,"end_line":302,"end_character":54},"updated":"2017-03-20 08:58:07.000000000","message":"set/get_external_value is no longer available, plus we have the emit_updated do something similar...","commit_id":"eb7a9fbf86e9e6bd770b51a1e1010b7a1728b3a4"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"cca9863ec2c82c139407b1ee390648a1f81b0bfd","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            return False"},{"line_number":256,"context_line":"        return True"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _logical_port_process(self, lport):"},{"line_number":259,"context_line":"        lswitch \u003d lport.lswitch"},{"line_number":260,"context_line":"        if not lswitch:"},{"line_number":261,"context_line":"            LOG.warning(\"Could not find lswitch for lport: %s\","}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_aad0f8ca","line":258,"range":{"start_line":258,"start_character":3,"end_line":258,"end_character":43},"updated":"2017-05-15 12:26:16.000000000","message":"worth to put REVISIT comment for future split of lport processing","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"09273982d699db40df038f6752232078e9c16f5a","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            return False"},{"line_number":256,"context_line":"        return True"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _logical_port_process(self, lport):"},{"line_number":259,"context_line":"        lswitch \u003d lport.lswitch"},{"line_number":260,"context_line":"        if not lswitch:"},{"line_number":261,"context_line":"            LOG.warning(\"Could not find lswitch for lport: %s\","}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_8b18871d","line":258,"range":{"start_line":258,"start_character":3,"end_line":258,"end_character":43},"in_reply_to":"1f013ff3_aad0f8ca","updated":"2017-05-16 06:52:43.000000000","message":"Sure. There\u0027s now a bug for it as well.","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c6b11e48393ca2e848c779de75724cb7748d2dc9","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        for port in remote_ports:"},{"line_number":246,"context_line":"            self.delete_lport(port.get_id())"},{"line_number":247,"context_line":"        self.db_store2.delete(chassis)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _notify_active_ports_updated_when_lport_created(self, lport):"},{"line_number":250,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":251,"context_line":"        for active_port in active_ports:"},{"line_number":252,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":253,"context_line":"                self.open_flow_app.notify_update_active_port(active_port,"},{"line_number":254,"context_line":"                                                             None)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _notify_active_ports_updated_when_lport_removed(self, lport):"},{"line_number":257,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":258,"context_line":"        for active_port in active_ports:"},{"line_number":259,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":260,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":261,"context_line":"                self.db_store.delete_active_port(active_port.get_id())"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def _is_physical_chassis(self, chassis):"},{"line_number":264,"context_line":"        if not chassis:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_685f6f72","side":"PARENT","line":261,"range":{"start_line":248,"start_character":0,"end_line":261,"end_character":70},"updated":"2017-05-19 03:16:13.000000000","message":"Are these being considered in new version?","commit_id":"09d4be0926b677b6ff48dbd0d0c931886319545a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a54477ccc025021aaa3f5513418843c004cd83e1","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        for port in remote_ports:"},{"line_number":246,"context_line":"            self.delete_lport(port.get_id())"},{"line_number":247,"context_line":"        self.db_store2.delete(chassis)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _notify_active_ports_updated_when_lport_created(self, lport):"},{"line_number":250,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":251,"context_line":"        for active_port in active_ports:"},{"line_number":252,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":253,"context_line":"                self.open_flow_app.notify_update_active_port(active_port,"},{"line_number":254,"context_line":"                                                             None)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _notify_active_ports_updated_when_lport_removed(self, lport):"},{"line_number":257,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":258,"context_line":"        for active_port in active_ports:"},{"line_number":259,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":260,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":261,"context_line":"                self.db_store.delete_active_port(active_port.get_id())"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def _is_physical_chassis(self, chassis):"},{"line_number":264,"context_line":"        if not chassis:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_acb8f475","side":"PARENT","line":261,"range":{"start_line":248,"start_character":0,"end_line":261,"end_character":70},"in_reply_to":"ff0f0b1f_685f6f72","updated":"2017-05-19 09:55:34.000000000","message":"No. I can\u0027t find anything that registers to these events.\n\nIf needed, we can have the active port detection app fire them.","commit_id":"09d4be0926b677b6ff48dbd0d0c931886319545a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3ea0b7b2cdd7ce2dfd7c54289a6c5655a7f92b82","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        for port in remote_ports:"},{"line_number":246,"context_line":"            self.delete_lport(port.get_id())"},{"line_number":247,"context_line":"        self.db_store2.delete(chassis)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _notify_active_ports_updated_when_lport_created(self, lport):"},{"line_number":250,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":251,"context_line":"        for active_port in active_ports:"},{"line_number":252,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":253,"context_line":"                self.open_flow_app.notify_update_active_port(active_port,"},{"line_number":254,"context_line":"                                                             None)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _notify_active_ports_updated_when_lport_removed(self, lport):"},{"line_number":257,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":258,"context_line":"        for active_port in active_ports:"},{"line_number":259,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":260,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":261,"context_line":"                self.db_store.delete_active_port(active_port.get_id())"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def _is_physical_chassis(self, chassis):"},{"line_number":264,"context_line":"        if not chassis:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_adfe9534","side":"PARENT","line":261,"range":{"start_line":248,"start_character":0,"end_line":261,"end_character":70},"in_reply_to":"ff0f0b1f_acb8f475","updated":"2017-05-20 02:32:42.000000000","message":"Based on my memory of previous discussion with @yuanwei, it is a placeholder for the in-progress active port functionality. So I guess it is needed, but it is better to let @yuanwei comment.","commit_id":"09d4be0926b677b6ff48dbd0d0c931886319545a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"164dda7267f10a2ce6059d5c24e97d6c716eed9f","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        for port in remote_ports:"},{"line_number":246,"context_line":"            self.delete_lport(port.get_id())"},{"line_number":247,"context_line":"        self.db_store2.delete(chassis)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _notify_active_ports_updated_when_lport_created(self, lport):"},{"line_number":250,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":251,"context_line":"        for active_port in active_ports:"},{"line_number":252,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":253,"context_line":"                self.open_flow_app.notify_update_active_port(active_port,"},{"line_number":254,"context_line":"                                                             None)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _notify_active_ports_updated_when_lport_removed(self, lport):"},{"line_number":257,"context_line":"        active_ports \u003d self.db_store.get_active_ports(lport.get_topic())"},{"line_number":258,"context_line":"        for active_port in active_ports:"},{"line_number":259,"context_line":"            if active_port.get_detected_lport_id() \u003d\u003d lport.get_id():"},{"line_number":260,"context_line":"                self.open_flow_app.notify_remove_active_port(active_port)"},{"line_number":261,"context_line":"                self.db_store.delete_active_port(active_port.get_id())"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def _is_physical_chassis(self, chassis):"},{"line_number":264,"context_line":"        if not chassis:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_6f08672b","side":"PARENT","line":261,"range":{"start_line":248,"start_character":0,"end_line":261,"end_character":70},"in_reply_to":"ff0f0b1f_adfe9534","updated":"2017-05-21 16:13:18.000000000","message":"I think that unless YuanWei can defend it, this can be removed. These events can be re-added when they are needed (they are kept in history), and I think that after the north-bound refactor, active_port.emit_updated() from within the active-port app would be a better solution.\n\nThis code will have to be removed anyway as part of bug 1690775 .","commit_id":"09d4be0926b677b6ff48dbd0d0c931886319545a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c6b11e48393ca2e848c779de75724cb7748d2dc9","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        if is_local:"},{"line_number":326,"context_line":"            lport.ofport \u003d self.vswitch_api.get_port_ofport_by_id(lport.id)"},{"line_number":327,"context_line":"        else:"},{"line_number":328,"context_line":"            lport.peer_vtep_address \u003d (chassis.ip if not lport.remote_vtep else"},{"line_number":329,"context_line":"                                       lport.binding_profile[\u0027host_ip\u0027])"},{"line_number":330,"context_line":"            lport.ofport \u003d self.vswitch_api.get_vtp_ofport(lport.network_type)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_e8c01f2d","line":328,"range":{"start_line":328,"start_character":50,"end_line":328,"end_character":74},"updated":"2017-05-19 03:16:13.000000000","message":"I think whether remote_vtep, the peer_vtep_address comes from lport.binding_profile[\u0027host_ip\u0027] anyway.","commit_id":"c09919c64688cb9b30c83f1c56cc66cb8653c4bf"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a54477ccc025021aaa3f5513418843c004cd83e1","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        if is_local:"},{"line_number":326,"context_line":"            lport.ofport \u003d self.vswitch_api.get_port_ofport_by_id(lport.id)"},{"line_number":327,"context_line":"        else:"},{"line_number":328,"context_line":"            lport.peer_vtep_address \u003d (chassis.ip if not lport.remote_vtep else"},{"line_number":329,"context_line":"                                       lport.binding_profile[\u0027host_ip\u0027])"},{"line_number":330,"context_line":"            lport.ofport \u003d self.vswitch_api.get_vtp_ofport(lport.network_type)"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_3f0e4832","line":328,"range":{"start_line":328,"start_character":50,"end_line":328,"end_character":74},"in_reply_to":"ff0f0b1f_e8c01f2d","updated":"2017-05-19 09:55:34.000000000","message":"Yes. I\u0027ll simplify. (Nice catch)","commit_id":"c09919c64688cb9b30c83f1c56cc66cb8653c4bf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c6b11e48393ca2e848c779de75724cb7748d2dc9","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        lswitch \u003d lport.lswitch"},{"line_number":346,"context_line":"        if not lswitch:"},{"line_number":347,"context_line":"            LOG.warning(\"Could not find lswitch for lport: %s\","},{"line_number":348,"context_line":"                        lport.get_id())"},{"line_number":349,"context_line":"            return False"},{"line_number":350,"context_line":"        lport.local_network_id \u003d lswitch.unique_key"},{"line_number":351,"context_line":"        network_type \u003d lswitch.network_type"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_48d14bfb","line":348,"range":{"start_line":348,"start_character":24,"end_line":348,"end_character":38},"updated":"2017-05-19 03:16:13.000000000","message":"lport.id","commit_id":"c09919c64688cb9b30c83f1c56cc66cb8653c4bf"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a54477ccc025021aaa3f5513418843c004cd83e1","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        lswitch \u003d lport.lswitch"},{"line_number":346,"context_line":"        if not lswitch:"},{"line_number":347,"context_line":"            LOG.warning(\"Could not find lswitch for lport: %s\","},{"line_number":348,"context_line":"                        lport.get_id())"},{"line_number":349,"context_line":"            return False"},{"line_number":350,"context_line":"        lport.local_network_id \u003d lswitch.unique_key"},{"line_number":351,"context_line":"        network_type \u003d lswitch.network_type"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_ff17b044","line":348,"range":{"start_line":348,"start_character":24,"end_line":348,"end_character":38},"in_reply_to":"ff0f0b1f_48d14bfb","updated":"2017-05-19 09:55:34.000000000","message":"Done","commit_id":"c09919c64688cb9b30c83f1c56cc66cb8653c4bf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            return"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        # Notify about remote port update"},{"line_number":220,"context_line":"        index \u003d l2.LogicalPort.get_indexes()[\u0027chassis_id\u0027]"},{"line_number":221,"context_line":"        remote_ports \u003d self.db_store2.get_all(l2.LogicalPort(chassis\u003dchassis),"},{"line_number":222,"context_line":"                                              index\u003dindex)"},{"line_number":223,"context_line":"        for port in remote_ports:"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_8a228cff","line":220,"range":{"start_line":220,"start_character":31,"end_line":220,"end_character":58},"updated":"2017-05-21 12:00:07.000000000","message":"get_index(\u0027chassis_id\u0027)","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            return"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        # Notify about remote port update"},{"line_number":220,"context_line":"        index \u003d l2.LogicalPort.get_indexes()[\u0027chassis_id\u0027]"},{"line_number":221,"context_line":"        remote_ports \u003d self.db_store2.get_all(l2.LogicalPort(chassis\u003dchassis),"},{"line_number":222,"context_line":"                                              index\u003dindex)"},{"line_number":223,"context_line":"        for port in remote_ports:"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_4cc1312e","line":220,"range":{"start_line":220,"start_character":31,"end_line":220,"end_character":58},"in_reply_to":"ff0f0b1f_8a228cff","updated":"2017-05-21 13:55:09.000000000","message":"Done","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        if not lswitch:"},{"line_number":344,"context_line":"            LOG.warning(\"Could not find lswitch for lport: %s\", lport.id)"},{"line_number":345,"context_line":"            return False"},{"line_number":346,"context_line":"        lport.local_network_id \u003d lswitch.unique_key"},{"line_number":347,"context_line":"        network_type \u003d lswitch.network_type"},{"line_number":348,"context_line":"        segment_id \u003d lswitch.segmentation_id"},{"line_number":349,"context_line":"        physical_network \u003d lswitch.physical_network"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_aa72f0e1","line":346,"range":{"start_line":346,"start_character":14,"end_line":346,"end_character":30},"updated":"2017-05-21 12:00:07.000000000","message":"Not sure if this is within the scope of this patch but we don\u0027t need this one anymore since we have references.","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"cd9245566504d1d323d9430b270a5c68344db8a2","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        if not lswitch:"},{"line_number":344,"context_line":"            LOG.warning(\"Could not find lswitch for lport: %s\", lport.id)"},{"line_number":345,"context_line":"            return False"},{"line_number":346,"context_line":"        lport.local_network_id \u003d lswitch.unique_key"},{"line_number":347,"context_line":"        network_type \u003d lswitch.network_type"},{"line_number":348,"context_line":"        segment_id \u003d lswitch.segmentation_id"},{"line_number":349,"context_line":"        physical_network \u003d lswitch.physical_network"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_0f3b2b9c","line":346,"range":{"start_line":346,"start_character":14,"end_line":346,"end_character":30},"in_reply_to":"ff0f0b1f_8cc74946","updated":"2017-05-21 14:53:03.000000000","message":"+1","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        if not lswitch:"},{"line_number":344,"context_line":"            LOG.warning(\"Could not find lswitch for lport: %s\", lport.id)"},{"line_number":345,"context_line":"            return False"},{"line_number":346,"context_line":"        lport.local_network_id \u003d lswitch.unique_key"},{"line_number":347,"context_line":"        network_type \u003d lswitch.network_type"},{"line_number":348,"context_line":"        segment_id \u003d lswitch.segmentation_id"},{"line_number":349,"context_line":"        physical_network \u003d lswitch.physical_network"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_8cc74946","line":346,"range":{"start_line":346,"start_character":14,"end_line":346,"end_character":30},"in_reply_to":"ff0f0b1f_aa72f0e1","updated":"2017-05-21 13:55:09.000000000","message":"Should be done separately. It means going through all code and removing local_network_id method.\n\nCan be added to bug 1690775.","commit_id":"524c8952bd90f94281046792070323e757919725"}],"dragonflow/controller/dhcp_app.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            LOG.error(\"Did not find DHCP server address for subnet\")"},{"line_number":160,"context_line":"            LOG.error(\"Subnet: %r: object: %r\", subnet, subnet.get_object())"},{"line_number":161,"context_line":"            LOG.error(\"Subnet in db_store2: %r\","},{"line_number":162,"context_line":"                      self.db_store2.get_one(l2.Subnet(id\u003dsubnet.id)))"},{"line_number":163,"context_line":"        netmask_bin \u003d subnet.cidr.netmask.packed"},{"line_number":164,"context_line":"        domain_name_bin \u003d struct.pack(\u0027!%ss\u0027 % len(self.domain_name),"},{"line_number":165,"context_line":"                                      self.domain_name)"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_8a504c5f","line":162,"range":{"start_line":162,"start_character":22,"end_line":162,"end_character":69},"updated":"2017-05-21 12:00:07.000000000","message":"What\u0027s the difference between this and .get_object() above?","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            LOG.error(\"Did not find DHCP server address for subnet\")"},{"line_number":160,"context_line":"            LOG.error(\"Subnet: %r: object: %r\", subnet, subnet.get_object())"},{"line_number":161,"context_line":"            LOG.error(\"Subnet in db_store2: %r\","},{"line_number":162,"context_line":"                      self.db_store2.get_one(l2.Subnet(id\u003dsubnet.id)))"},{"line_number":163,"context_line":"        netmask_bin \u003d subnet.cidr.netmask.packed"},{"line_number":164,"context_line":"        domain_name_bin \u003d struct.pack(\u0027!%ss\u0027 % len(self.domain_name),"},{"line_number":165,"context_line":"                                      self.domain_name)"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_6cdbd51a","line":162,"range":{"start_line":162,"start_character":22,"end_line":162,"end_character":69},"in_reply_to":"ff0f0b1f_8a504c5f","updated":"2017-05-21 13:55:09.000000000","message":"Debug code. Will fix.","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_LOCAL_DELETED)"},{"line_number":291,"context_line":"    def _remove_local_port(self, lport):"},{"line_number":292,"context_line":"        if lport.ip.version !\u003d 4:"},{"line_number":293,"context_line":"            LOG.warning(\"No support for non IPv4 protocol\")"},{"line_number":294,"context_line":"            return"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_ead468bf","line":292,"range":{"start_line":292,"start_character":31,"end_line":292,"end_character":33},"updated":"2017-05-21 12:00:07.000000000","message":"n_const.IP_VERSION_4","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_LOCAL_DELETED)"},{"line_number":291,"context_line":"    def _remove_local_port(self, lport):"},{"line_number":292,"context_line":"        if lport.ip.version !\u003d 4:"},{"line_number":293,"context_line":"            LOG.warning(\"No support for non IPv4 protocol\")"},{"line_number":294,"context_line":"            return"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_2c071d85","line":292,"range":{"start_line":292,"start_character":31,"end_line":292,"end_character":33},"in_reply_to":"ff0f0b1f_ead468bf","updated":"2017-05-21 13:55:09.000000000","message":"Done","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_LOCAL_CREATED)"},{"line_number":315,"context_line":"    def _add_local_port(self, lport):"},{"line_number":316,"context_line":"        if lport.ip.version !\u003d 4:"},{"line_number":317,"context_line":"            LOG.warning(\"No support for non IPv4 protocol\")"},{"line_number":318,"context_line":"            return"},{"line_number":319,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_cadbe4ea","line":316,"range":{"start_line":316,"start_character":31,"end_line":316,"end_character":32},"updated":"2017-05-21 12:00:07.000000000","message":"n_const.","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_LOCAL_CREATED)"},{"line_number":315,"context_line":"    def _add_local_port(self, lport):"},{"line_number":316,"context_line":"        if lport.ip.version !\u003d 4:"},{"line_number":317,"context_line":"            LOG.warning(\"No support for non IPv4 protocol\")"},{"line_number":318,"context_line":"            return"},{"line_number":319,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_0c0a1989","line":316,"range":{"start_line":316,"start_character":31,"end_line":316,"end_character":32},"in_reply_to":"ff0f0b1f_cadbe4ea","updated":"2017-05-21 13:55:09.000000000","message":"Done","commit_id":"524c8952bd90f94281046792070323e757919725"}],"dragonflow/controller/l2_app.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"cca9863ec2c82c139407b1ee390648a1f81b0bfd","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            elif ip_version \u003d\u003d 6:"},{"line_number":129,"context_line":"                nd_advertisers.NeighAdvertiser(self,"},{"line_number":130,"context_line":"                                               network_id, ip).remove()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_LOCAL_DELETED)"},{"line_number":133,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_REMOTE_DELETED)"},{"line_number":134,"context_line":"    def _remove_port(self, lport):"},{"line_number":135,"context_line":"        mac \u003d lport.mac"},{"line_number":136,"context_line":"        network_id \u003d lport.local_network_id"},{"line_number":137,"context_line":"        device_owner \u003d lport.device_owner"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_0a2b6c94","line":134,"range":{"start_line":131,"start_character":0,"end_line":134,"end_character":34},"updated":"2017-05-15 12:26:16.000000000","message":"I think its better to have separate methods to handle local/remote port removal","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"09273982d699db40df038f6752232078e9c16f5a","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            elif ip_version \u003d\u003d 6:"},{"line_number":129,"context_line":"                nd_advertisers.NeighAdvertiser(self,"},{"line_number":130,"context_line":"                                               network_id, ip).remove()"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_LOCAL_DELETED)"},{"line_number":133,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_REMOTE_DELETED)"},{"line_number":134,"context_line":"    def _remove_port(self, lport):"},{"line_number":135,"context_line":"        mac \u003d lport.mac"},{"line_number":136,"context_line":"        network_id \u003d lport.local_network_id"},{"line_number":137,"context_line":"        device_owner \u003d lport.device_owner"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_4bd83f52","line":134,"range":{"start_line":131,"start_character":0,"end_line":134,"end_character":34},"in_reply_to":"1f013ff3_0a2b6c94","updated":"2017-05-16 06:52:43.000000000","message":"Will do","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"c6b11e48393ca2e848c779de75724cb7748d2dc9","unresolved":false,"context_lines":[{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_REMOTE_CREATED)"},{"line_number":439,"context_line":"    def _add_remote_port(self, lport):"},{"line_number":440,"context_line":"        mac \u003d lport.mac"},{"line_number":441,"context_line":"        network_id \u003d lport.local_network_id"},{"line_number":442,"context_line":"        port_key \u003d lport.unique_key"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        # Router MAC\u0027s go to L3 table will be taken care by l3 app"},{"line_number":445,"context_line":"        # REVISIT(xiaohhui): This check might be removed when l3-agent is"},{"line_number":446,"context_line":"        # obsoleted."},{"line_number":447,"context_line":"        if lport.device_owner !\u003d common_const.DEVICE_OWNER_ROUTER_INTF:"},{"line_number":448,"context_line":"            self._add_dst_classifier_flow_for_port(network_id, mac, port_key)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        self._add_l2_responders(lport)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    def _get_multicast_broadcast_match(self, network_id):"},{"line_number":453,"context_line":"        match \u003d self.parser.OFPMatch(eth_dst\u003d\u002701:00:00:00:00:00\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_08811390","line":450,"range":{"start_line":440,"start_character":0,"end_line":450,"end_character":38},"updated":"2017-05-19 03:16:13.000000000","message":"why not put these code into a method and use it both in add local port and add remote port(as you did for removing local port and removing remote port)","commit_id":"c09919c64688cb9b30c83f1c56cc66cb8653c4bf"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"a54477ccc025021aaa3f5513418843c004cd83e1","unresolved":false,"context_lines":[{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    @df_base_app.register_event(l2.LogicalPort, l2.EVENT_REMOTE_CREATED)"},{"line_number":439,"context_line":"    def _add_remote_port(self, lport):"},{"line_number":440,"context_line":"        mac \u003d lport.mac"},{"line_number":441,"context_line":"        network_id \u003d lport.local_network_id"},{"line_number":442,"context_line":"        port_key \u003d lport.unique_key"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"        # Router MAC\u0027s go to L3 table will be taken care by l3 app"},{"line_number":445,"context_line":"        # REVISIT(xiaohhui): This check might be removed when l3-agent is"},{"line_number":446,"context_line":"        # obsoleted."},{"line_number":447,"context_line":"        if lport.device_owner !\u003d common_const.DEVICE_OWNER_ROUTER_INTF:"},{"line_number":448,"context_line":"            self._add_dst_classifier_flow_for_port(network_id, mac, port_key)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        self._add_l2_responders(lport)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    def _get_multicast_broadcast_match(self, network_id):"},{"line_number":453,"context_line":"        match \u003d self.parser.OFPMatch(eth_dst\u003d\u002701:00:00:00:00:00\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff0f0b1f_df286c87","line":450,"range":{"start_line":440,"start_character":0,"end_line":450,"end_character":38},"in_reply_to":"ff0f0b1f_08811390","updated":"2017-05-19 09:55:34.000000000","message":"Done","commit_id":"c09919c64688cb9b30c83f1c56cc66cb8653c4bf"}],"dragonflow/controller/l3_app.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            l3.LogicalRouter.get_index(\u0027unique_key\u0027))"},{"line_number":72,"context_line":"        for router_port in router.ports:"},{"line_number":73,"context_line":"            if ip_addr in router_port.network:"},{"line_number":74,"context_line":"                index \u003d l2.LogicalPort.get_indexes()[\u0027lswitch_id\u0027]"},{"line_number":75,"context_line":"                dst_ports \u003d self.db_store2.get_all("},{"line_number":76,"context_line":"                    l2.LogicalPort(lswitch\u003dl2.LogicalSwitch("},{"line_number":77,"context_line":"                        id\u003drouter_port.lswitch.id)),"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_0aeb1c79","line":74,"range":{"start_line":74,"start_character":39,"end_line":74,"end_character":50},"updated":"2017-05-21 12:00:07.000000000","message":"get_index(","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            l3.LogicalRouter.get_index(\u0027unique_key\u0027))"},{"line_number":72,"context_line":"        for router_port in router.ports:"},{"line_number":73,"context_line":"            if ip_addr in router_port.network:"},{"line_number":74,"context_line":"                index \u003d l2.LogicalPort.get_indexes()[\u0027lswitch_id\u0027]"},{"line_number":75,"context_line":"                dst_ports \u003d self.db_store2.get_all("},{"line_number":76,"context_line":"                    l2.LogicalPort(lswitch\u003dl2.LogicalSwitch("},{"line_number":77,"context_line":"                        id\u003drouter_port.lswitch.id)),"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_cf0c133d","line":74,"range":{"start_line":74,"start_character":39,"end_line":74,"end_character":50},"in_reply_to":"ff0f0b1f_0aeb1c79","updated":"2017-05-21 13:55:09.000000000","message":"Done","commit_id":"524c8952bd90f94281046792070323e757919725"}],"dragonflow/controller/l3_app_base.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"59a7fa1e202a92c2a507c9a1dea3642398f6f3f7","unresolved":false,"context_lines":[{"line_number":364,"context_line":"    def _add_new_router_port(self, router, router_port):"},{"line_number":365,"context_line":"        LOG.info(\"Adding new logical router interface \u003d %s\","},{"line_number":366,"context_line":"                 router_port)"},{"line_number":367,"context_line":"        local_network_id \u003d self.db_store2.get_one("},{"line_number":368,"context_line":"            l2.LogicalSwitch(id\u003drouter_port.lswitch.id)).unique_key"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        parser \u003d self.parser"},{"line_number":371,"context_line":"        ofproto \u003d self.ofproto"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_ef90e04c","line":368,"range":{"start_line":367,"start_character":0,"end_line":368,"end_character":67},"updated":"2017-04-27 06:59:45.000000000","message":"Can be replaced with router_port.lswitch.unique_key","commit_id":"266db5ccf816d3f8512607197f7109076992df24"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"59a7fa1e202a92c2a507c9a1dea3642398f6f3f7","unresolved":false,"context_lines":[{"line_number":433,"context_line":"    def _delete_router_port(self, router, router_port):"},{"line_number":434,"context_line":"        LOG.info(\"Removing logical router interface \u003d %s\","},{"line_number":435,"context_line":"                 router_port)"},{"line_number":436,"context_line":"        local_network_id \u003d self.db_store2.get_one("},{"line_number":437,"context_line":"            l2.LogicalSwitch(id\u003drouter_port.lswitch.id)).unique_key"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        parser \u003d self.parser"},{"line_number":440,"context_line":"        ofproto \u003d self.ofproto"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_af865812","line":437,"range":{"start_line":436,"start_character":0,"end_line":437,"end_character":67},"updated":"2017-04-27 06:59:45.000000000","message":"Same here: router_port.lswitch.unique_key","commit_id":"266db5ccf816d3f8512607197f7109076992df24"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":449,"context_line":"            match\u003dmatch)"},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"        # Delete ARP \u0026 ICMP responder for router interface"},{"line_number":452,"context_line":"        if ip.version \u003d\u003d 4:"},{"line_number":453,"context_line":"            self.router_port_rarp_cache.pop(mac, None)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"            arp_responder.ArpResponder(self, local_network_id, ip).remove()"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_b8eb6eda","line":452,"range":{"start_line":452,"start_character":25,"end_line":452,"end_character":26},"updated":"2017-05-17 08:32:50.000000000","message":"If you already updating this line, please considure to use n_const.IP_VERSION_4","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":449,"context_line":"            match\u003dmatch)"},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"        # Delete ARP \u0026 ICMP responder for router interface"},{"line_number":452,"context_line":"        if ip.version \u003d\u003d 4:"},{"line_number":453,"context_line":"            self.router_port_rarp_cache.pop(mac, None)"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"            arp_responder.ArpResponder(self, local_network_id, ip).remove()"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_bdaa3bcf","line":452,"range":{"start_line":452,"start_character":25,"end_line":452,"end_character":26},"in_reply_to":"1f013ff3_b8eb6eda","updated":"2017-05-18 18:15:13.000000000","message":"Done in a different patch by someone else.","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                self._add_router_extra_route(new_router, new_route)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_port_by_lswitch_and_ip(self, ip, lswitch_id):"},{"line_number":176,"context_line":"        ports \u003d self.db_store2.get_all(l2.LogicalPort)"},{"line_number":177,"context_line":"        for port in ports:"},{"line_number":178,"context_line":"            if port.ip \u003d\u003d ip and port.lswitch.id \u003d\u003d lswitch_id:"},{"line_number":179,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_8afe0c35","line":176,"range":{"start_line":176,"start_character":7,"end_line":176,"end_character":54},"updated":"2017-05-21 12:00:07.000000000","message":"Probably can use an index here","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                self._add_router_extra_route(new_router, new_route)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_port_by_lswitch_and_ip(self, ip, lswitch_id):"},{"line_number":176,"context_line":"        ports \u003d self.db_store2.get_all(l2.LogicalPort)"},{"line_number":177,"context_line":"        for port in ports:"},{"line_number":178,"context_line":"            if port.ip \u003d\u003d ip and port.lswitch.id \u003d\u003d lswitch_id:"},{"line_number":179,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_0c7d79e6","line":176,"range":{"start_line":176,"start_character":7,"end_line":176,"end_character":54},"in_reply_to":"ff0f0b1f_8afe0c35","updated":"2017-05-21 13:55:09.000000000","message":"Done","commit_id":"524c8952bd90f94281046792070323e757919725"}],"dragonflow/controller/l3_proactive_app.py":[{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self._add_port_process(dst_ip, dst_mac, network_id, tunnel_key)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _add_port_process(self, dst_ip, dst_mac, network_id, tunnel_key,"},{"line_number":67,"context_line":"                          priority\u003dconst.PRIORITY_HIGH):"},{"line_number":68,"context_line":"        parser \u003d self.parser"},{"line_number":69,"context_line":"        ofproto \u003d self.ofproto"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_d8f3da9d","line":66,"range":{"start_line":66,"start_character":32,"end_line":66,"end_character":38},"updated":"2017-05-17 08:32:50.000000000","message":"String expected, but IPAddress object was sent (line 64)","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self._add_port_process(dst_ip, dst_mac, network_id, tunnel_key)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _add_port_process(self, dst_ip, dst_mac, network_id, tunnel_key,"},{"line_number":67,"context_line":"                          priority\u003dconst.PRIORITY_HIGH):"},{"line_number":68,"context_line":"        parser \u003d self.parser"},{"line_number":69,"context_line":"        ofproto \u003d self.ofproto"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_3ded0b25","line":66,"range":{"start_line":66,"start_character":32,"end_line":66,"end_character":38},"in_reply_to":"1f013ff3_d8f3da9d","updated":"2017-05-18 18:15:13.000000000","message":"Same reply as below.","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        parser \u003d self.parser"},{"line_number":69,"context_line":"        ofproto \u003d self.ofproto"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        if netaddr.IPAddress(dst_ip).version \u003d\u003d 4:"},{"line_number":72,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":73,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":74,"context_line":"                                    ipv4_dst\u003ddst_ip)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_d84f5abb","line":71,"range":{"start_line":71,"start_character":11,"end_line":71,"end_character":44},"updated":"2017-05-17 08:32:50.000000000","message":"dst_ip.version","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        parser \u003d self.parser"},{"line_number":69,"context_line":"        ofproto \u003d self.ofproto"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        if netaddr.IPAddress(dst_ip).version \u003d\u003d 4:"},{"line_number":72,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":73,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":74,"context_line":"                                    ipv4_dst\u003ddst_ip)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_fdf683f9","line":71,"range":{"start_line":71,"start_character":11,"end_line":71,"end_character":44},"in_reply_to":"1f013ff3_d84f5abb","updated":"2017-05-18 18:15:13.000000000","message":"Done","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        self._remove_port_process(dst_ip, network_id)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _remove_port_process(self, dst_ip, network_id,"},{"line_number":103,"context_line":"                             priority\u003dconst.PRIORITY_HIGH):"},{"line_number":104,"context_line":"        parser \u003d self.parser"},{"line_number":105,"context_line":"        ofproto \u003d self.ofproto"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_f839f63e","line":102,"range":{"start_line":102,"start_character":35,"end_line":102,"end_character":41},"updated":"2017-05-17 08:32:50.000000000","message":"String expected, but IPAddress object was sent (line 100)","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        self._remove_port_process(dst_ip, network_id)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _remove_port_process(self, dst_ip, network_id,"},{"line_number":103,"context_line":"                             priority\u003dconst.PRIORITY_HIGH):"},{"line_number":104,"context_line":"        parser \u003d self.parser"},{"line_number":105,"context_line":"        ofproto \u003d self.ofproto"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_1d424f11","line":102,"range":{"start_line":102,"start_character":35,"end_line":102,"end_character":41},"in_reply_to":"1f013ff3_f839f63e","updated":"2017-05-18 18:15:13.000000000","message":"OFPMatch can handle both ip string and netaddr.IPAddress object. In the end it reaches here[1]\n\n[1] https://github.com/osrg/ryu/blob/e0e30d3d96eeda01f7c59ddb1773793994e830f4/ryu/lib/addrconv.py#L33","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        parser \u003d self.parser"},{"line_number":105,"context_line":"        ofproto \u003d self.ofproto"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if netaddr.IPAddress(dst_ip).version \u003d\u003d 4:"},{"line_number":108,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":109,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":110,"context_line":"                                    ipv4_dst\u003ddst_ip)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_18db82ed","line":107,"range":{"start_line":107,"start_character":11,"end_line":107,"end_character":44},"updated":"2017-05-17 08:32:50.000000000","message":"dst_ip.version","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        parser \u003d self.parser"},{"line_number":105,"context_line":"        ofproto \u003d self.ofproto"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if netaddr.IPAddress(dst_ip).version \u003d\u003d 4:"},{"line_number":108,"context_line":"            match \u003d parser.OFPMatch(eth_type\u003dether.ETH_TYPE_IP,"},{"line_number":109,"context_line":"                                    metadata\u003dnetwork_id,"},{"line_number":110,"context_line":"                                    ipv4_dst\u003ddst_ip)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_fd44431d","line":107,"range":{"start_line":107,"start_character":11,"end_line":107,"end_character":44},"in_reply_to":"1f013ff3_18db82ed","updated":"2017-05-18 18:15:13.000000000","message":"Done","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"}],"dragonflow/controller/metadata_service_app.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        return h"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def _get_logical_port_by_tunnel_key(self, tunnel_key):"},{"line_number":525,"context_line":"        lports \u003d self.nb_api.get_all(l2.LogicalPort)"},{"line_number":526,"context_line":"        for lport in lports:"},{"line_number":527,"context_line":"            if lport.unique_key \u003d\u003d tunnel_key:"},{"line_number":528,"context_line":"                return lport"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_2a99401e","line":525,"range":{"start_line":525,"start_character":8,"end_line":525,"end_character":52},"updated":"2017-05-21 12:00:07.000000000","message":"Lookup by unique key index","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        return h"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def _get_logical_port_by_tunnel_key(self, tunnel_key):"},{"line_number":525,"context_line":"        lports \u003d self.nb_api.get_all(l2.LogicalPort)"},{"line_number":526,"context_line":"        for lport in lports:"},{"line_number":527,"context_line":"            if lport.unique_key \u003d\u003d tunnel_key:"},{"line_number":528,"context_line":"                return lport"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_cc38a13e","line":525,"range":{"start_line":525,"start_character":8,"end_line":525,"end_character":52},"in_reply_to":"ff0f0b1f_2a99401e","updated":"2017-05-21 13:55:09.000000000","message":"Lookup is from nb_api, not db store.\n\nOtherwise, yes, it would be.","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"cd9245566504d1d323d9430b270a5c68344db8a2","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        return h"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def _get_logical_port_by_tunnel_key(self, tunnel_key):"},{"line_number":525,"context_line":"        lports \u003d self.nb_api.get_all(l2.LogicalPort)"},{"line_number":526,"context_line":"        for lport in lports:"},{"line_number":527,"context_line":"            if lport.unique_key \u003d\u003d tunnel_key:"},{"line_number":528,"context_line":"                return lport"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_8fc17b83","line":525,"range":{"start_line":525,"start_character":8,"end_line":525,"end_character":52},"in_reply_to":"ff0f0b1f_2a99401e","updated":"2017-05-21 14:53:03.000000000","message":"Oops, should have noticed","commit_id":"524c8952bd90f94281046792070323e757919725"}],"dragonflow/controller/portsec_app.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ab0774f7d234d09c5f0faf8a3c3a07b3d1e5a556","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def _get_allow_ip_mac_pairs(self, lport):"},{"line_number":42,"context_line":"        allowed_ip_mac_pairs \u003d []"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        fixed_ips \u003d lport.ips"},{"line_number":45,"context_line":"        fixed_mac \u003d lport.mac"},{"line_number":46,"context_line":"        if (fixed_ips is not None) and (fixed_mac is not None):"},{"line_number":47,"context_line":"            for fixed_ip in fixed_ips:"},{"line_number":48,"context_line":"                allowed_ip_mac_pairs.append("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_83682c89","line":45,"range":{"start_line":44,"start_character":8,"end_line":45,"end_character":29},"updated":"2017-03-20 08:58:07.000000000","message":"Please note that those are no longer strings (but are IPAddress/EUI, so if they reach modflow they\u0027ll need to be cast)","commit_id":"eb7a9fbf86e9e6bd770b51a1e1010b7a1728b3a4"}],"dragonflow/controller/sg_app.py":[{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        return False"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _get_ips_in_logical_port(self, lport):"},{"line_number":193,"context_line":"        \"\"\""},{"line_number":194,"context_line":"        Get all IP addresses which were bound with this lport as fixed IP"},{"line_number":195,"context_line":"        address or a IP address in allowed address pairs."}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_f378f92b","line":192,"range":{"start_line":192,"start_character":8,"end_line":192,"end_character":32},"updated":"2017-05-17 08:32:50.000000000","message":"Used to return a set of strings. Now Returning a set of IPAddress. \nThe callers to this method was not modified accordingly","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        return False"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _get_ips_in_logical_port(self, lport):"},{"line_number":193,"context_line":"        \"\"\""},{"line_number":194,"context_line":"        Get all IP addresses which were bound with this lport as fixed IP"},{"line_number":195,"context_line":"        address or a IP address in allowed address pairs."}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_1d292f37","line":192,"range":{"start_line":192,"start_character":8,"end_line":192,"end_character":32},"in_reply_to":"1f013ff3_f378f92b","updated":"2017-05-18 18:15:13.000000000","message":"In the end, the IP is used as a key. I verified that the dict is always accessed with an IPAddress object (and not a string)","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"657bd153e56439da84957df2e2b077226643aef1","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        added_ips \u003d []"},{"line_number":207,"context_line":"        ips \u003d self._get_ips_in_logical_port(lport)"},{"line_number":208,"context_line":"        for ip in ips:"},{"line_number":209,"context_line":"            if self._inc_ip_reference_and_check(secgroup_id, ip,"},{"line_number":210,"context_line":"                                                lport.id):"},{"line_number":211,"context_line":"                added_ips.append(ip)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return added_ips"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_6a7cd8b4","line":210,"range":{"start_line":209,"start_character":42,"end_line":210,"end_character":58},"updated":"2017-05-21 12:00:07.000000000","message":"Nit: redundant line-break","commit_id":"524c8952bd90f94281046792070323e757919725"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d697c3d80b3c821b7a010e5705603a282a3ce989","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        added_ips \u003d []"},{"line_number":207,"context_line":"        ips \u003d self._get_ips_in_logical_port(lport)"},{"line_number":208,"context_line":"        for ip in ips:"},{"line_number":209,"context_line":"            if self._inc_ip_reference_and_check(secgroup_id, ip,"},{"line_number":210,"context_line":"                                                lport.id):"},{"line_number":211,"context_line":"                added_ips.append(ip)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return added_ips"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_4c4491b7","line":210,"range":{"start_line":209,"start_character":42,"end_line":210,"end_character":58},"in_reply_to":"ff0f0b1f_6a7cd8b4","updated":"2017-05-21 13:55:09.000000000","message":"Done","commit_id":"524c8952bd90f94281046792070323e757919725"}],"dragonflow/controller/topology.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"cca9863ec2c82c139407b1ee390648a1f81b0bfd","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OvsLportMapping \u003d collections.namedtuple(\u0027OvsLportMapping\u0027,"},{"line_number":27,"context_line":"                                         (\u0027lport_id\u0027, \u0027topic\u0027))"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_e575139a","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":16},"updated":"2017-05-15 12:26:16.000000000","message":"worth to add comment to explain the tuple. I am not sure what topic in this context stands for.","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"09273982d699db40df038f6752232078e9c16f5a","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OvsLportMapping \u003d collections.namedtuple(\u0027OvsLportMapping\u0027,"},{"line_number":27,"context_line":"                                         (\u0027lport_id\u0027, \u0027topic\u0027))"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_ebe6eb16","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":16},"in_reply_to":"1f013ff3_e575139a","updated":"2017-05-16 06:52:43.000000000","message":"Will do","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ab0774f7d234d09c5f0faf8a3c3a07b3d1e5a556","unresolved":false,"context_lines":[{"line_number":389,"context_line":"    #                                sg_id, \u0027set\u0027, secgroup_json,"},{"line_number":390,"context_line":"    #                                secgroup[\u0027topic\u0027])"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def get_logical_port(self, port_id, topic\u003dNone):"},{"line_number":393,"context_line":"        try:"},{"line_number":394,"context_line":"            port_value \u003d self.driver.get_key(db_models.LogicalPort.table_name,"},{"line_number":395,"context_line":"                                             port_id, topic)"},{"line_number":396,"context_line":"            return db_models.LogicalPort(port_value)"},{"line_number":397,"context_line":"        except Exception:"},{"line_number":398,"context_line":"            return None"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"    def create_lrouter(self, id, topic, **columns):"},{"line_number":401,"context_line":"        lrouter \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_23c5b88d","line":398,"range":{"start_line":392,"start_character":0,"end_line":398,"end_character":23},"updated":"2017-03-20 08:58:07.000000000","message":"I think we can get rid of this as well","commit_id":"eb7a9fbf86e9e6bd770b51a1e1010b7a1728b3a4"}],"dragonflow/db/field_types.py":[{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            return str(obj)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class MacAddressField(fields.BaseField):"},{"line_number":166,"context_line":"    \u0027\u0027\u0027A field representing a MAC address, specifically a netaddr.EUI."},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    In serialized form it is stored in UNIX MAC format:"},{"line_number":169,"context_line":"        \"mac\": \"12:34:56:78:90:ab\""},{"line_number":170,"context_line":"    \u0027\u0027\u0027"},{"line_number":171,"context_line":"    types \u003d (netaddr.EUI,)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def parse_value(self, value):"},{"line_number":174,"context_line":"        if value is not None:"},{"line_number":175,"context_line":"            return netaddr.EUI(value, dialect\u003dnetaddr.mac_unix_expanded)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def to_struct(self, obj):"},{"line_number":178,"context_line":"        if obj is not None:"},{"line_number":179,"context_line":"            obj.dialect \u003d netaddr.mac_unix_expanded"},{"line_number":180,"context_line":"            return str(obj)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"class EnumField(fields.StringField):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_d34a9d53","line":180,"range":{"start_line":165,"start_character":0,"end_line":180,"end_character":27},"updated":"2017-05-17 08:32:50.000000000","message":"Nit: This can be separated to a different patch","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            return str(obj)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class MacAddressField(fields.BaseField):"},{"line_number":166,"context_line":"    \u0027\u0027\u0027A field representing a MAC address, specifically a netaddr.EUI."},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    In serialized form it is stored in UNIX MAC format:"},{"line_number":169,"context_line":"        \"mac\": \"12:34:56:78:90:ab\""},{"line_number":170,"context_line":"    \u0027\u0027\u0027"},{"line_number":171,"context_line":"    types \u003d (netaddr.EUI,)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def parse_value(self, value):"},{"line_number":174,"context_line":"        if value is not None:"},{"line_number":175,"context_line":"            return netaddr.EUI(value, dialect\u003dnetaddr.mac_unix_expanded)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def to_struct(self, obj):"},{"line_number":178,"context_line":"        if obj is not None:"},{"line_number":179,"context_line":"            obj.dialect \u003d netaddr.mac_unix_expanded"},{"line_number":180,"context_line":"            return str(obj)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"class EnumField(fields.StringField):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_bd9ebb51","line":180,"range":{"start_line":165,"start_character":0,"end_line":180,"end_character":27},"in_reply_to":"1f013ff3_d34a9d53","updated":"2017-05-18 18:15:13.000000000","message":"It would be a patch adding a field type that no-one uses. I think such a patch would be incomplete. (But if the majority says to split it up, I\u0027ll split it up).","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                        valid_values\u003d\u0027, \u0027.join(self._valid_values)))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class StringDictField(fields.BaseField):"},{"line_number":235,"context_line":"    \u0027\u0027\u0027A field that stores a string -\u003e string dictionary\u0027\u0027\u0027"},{"line_number":236,"context_line":"    types \u003d (dict,)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def validate(self, value):"},{"line_number":239,"context_line":"        super(StringDictField, self).validate(value)"},{"line_number":240,"context_line":"        if not value:"},{"line_number":241,"context_line":"            return"},{"line_number":242,"context_line":"        for key, inner_val in value.items():"},{"line_number":243,"context_line":"            if not isinstance(key, six.string_types):"},{"line_number":244,"context_line":"                raise errors.ValidationError("},{"line_number":245,"context_line":"                    _(\u0027Key {} is not a string\u0027).format(key))"},{"line_number":246,"context_line":"            if not isinstance(inner_val, six.string_types):"},{"line_number":247,"context_line":"                raise errors.ValidationError("},{"line_number":248,"context_line":"                    _(\u0027Value {value} to key {key} is not a string\u0027).format("},{"line_number":249,"context_line":"                        key\u003dkey, value\u003dinner_val))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def get_default_value(self):"},{"line_number":252,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_739e29b9","line":252,"range":{"start_line":234,"start_character":0,"end_line":252,"end_character":17},"updated":"2017-05-17 08:32:50.000000000","message":"Nit: This can be separated to a different patch","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                        valid_values\u003d\u0027, \u0027.join(self._valid_values)))"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class StringDictField(fields.BaseField):"},{"line_number":235,"context_line":"    \u0027\u0027\u0027A field that stores a string -\u003e string dictionary\u0027\u0027\u0027"},{"line_number":236,"context_line":"    types \u003d (dict,)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def validate(self, value):"},{"line_number":239,"context_line":"        super(StringDictField, self).validate(value)"},{"line_number":240,"context_line":"        if not value:"},{"line_number":241,"context_line":"            return"},{"line_number":242,"context_line":"        for key, inner_val in value.items():"},{"line_number":243,"context_line":"            if not isinstance(key, six.string_types):"},{"line_number":244,"context_line":"                raise errors.ValidationError("},{"line_number":245,"context_line":"                    _(\u0027Key {} is not a string\u0027).format(key))"},{"line_number":246,"context_line":"            if not isinstance(inner_val, six.string_types):"},{"line_number":247,"context_line":"                raise errors.ValidationError("},{"line_number":248,"context_line":"                    _(\u0027Value {value} to key {key} is not a string\u0027).format("},{"line_number":249,"context_line":"                        key\u003dkey, value\u003dinner_val))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def get_default_value(self):"},{"line_number":252,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":14,"id":"ff0f0b1f_5e63531b","line":252,"range":{"start_line":234,"start_character":0,"end_line":252,"end_character":17},"in_reply_to":"1f013ff3_739e29b9","updated":"2017-05-18 18:15:13.000000000","message":"Same response as above","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"}],"dragonflow/db/models/l2.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ab0774f7d234d09c5f0faf8a3c3a07b3d1e5a556","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# LogicalPort events"},{"line_number":86,"context_line":"EVENT_LOCAL_CREATED \u003d \u0027LOCAL_CREATED\u0027"},{"line_number":87,"context_line":"EVENT_REMOTE_CREATED \u003d \u0027REMOTE_CREATED\u0027"},{"line_number":88,"context_line":"EVENT_LOCAL_UPDATED \u003d \u0027LOCAL_UPDATED\u0027"},{"line_number":89,"context_line":"EVENT_REMOTE_UPDATED \u003d \u0027REMOTE_UPDATED\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_4069ca24","line":86,"range":{"start_line":86,"start_character":23,"end_line":86,"end_character":36},"updated":"2017-03-20 08:58:07.000000000","message":"Should be lowercase if you want to get emit_local_created()","commit_id":"eb7a9fbf86e9e6bd770b51a1e1010b7a1728b3a4"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ab0774f7d234d09c5f0faf8a3c3a07b3d1e5a556","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                    data[name] \u003d getattr(self, name)"},{"line_number":134,"context_line":"            elif not name.startswith(\u0027_\u0027):"},{"line_number":135,"context_line":"                data[name] \u003d getattr(self, name)"},{"line_number":136,"context_line":"        return str(data)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def emit_updated(self):"},{"line_number":139,"context_line":"        ofport \u003d getattr(self, \u0027ofport\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_e0e8f67e","line":136,"range":{"start_line":136,"start_character":19,"end_line":136,"end_character":23},"updated":"2017-03-20 08:58:07.000000000","message":"nit: Can we get a format() that also puts self.__class__.__name__ somewhere in the result?","commit_id":"eb7a9fbf86e9e6bd770b51a1e1010b7a1728b3a4"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ab0774f7d234d09c5f0faf8a3c3a07b3d1e5a556","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                data[name] \u003d getattr(self, name)"},{"line_number":136,"context_line":"        return str(data)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def emit_updated(self):"},{"line_number":139,"context_line":"        ofport \u003d getattr(self, \u0027ofport\u0027, None)"},{"line_number":140,"context_line":"        if not ofport:"},{"line_number":141,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_609406e2","line":138,"range":{"start_line":138,"start_character":8,"end_line":138,"end_character":20},"updated":"2017-03-20 08:58:07.000000000","message":"This code looks like it doesn\u0027t belong..","commit_id":"eb7a9fbf86e9e6bd770b51a1e1010b7a1728b3a4"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ab0774f7d234d09c5f0faf8a3c3a07b3d1e5a556","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        return str(data)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def emit_updated(self):"},{"line_number":139,"context_line":"        ofport \u003d getattr(self, \u0027ofport\u0027, None)"},{"line_number":140,"context_line":"        if not ofport:"},{"line_number":141,"context_line":"            return"},{"line_number":142,"context_line":"        is_local \u003d getattr(self, \u0027is_local\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_e09f1601","line":139,"range":{"start_line":139,"start_character":17,"end_line":139,"end_character":24},"updated":"2017-03-20 08:58:07.000000000","message":"I think it might be worth adding an constructor to set ofport/is_local instead of calling getattr with None.","commit_id":"eb7a9fbf86e9e6bd770b51a1e1010b7a1728b3a4"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"cca9863ec2c82c139407b1ee390648a1f81b0bfd","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# LogicalPort events"},{"line_number":83,"context_line":"EVENT_LOCAL_CREATED \u003d \u0027local_created\u0027"},{"line_number":84,"context_line":"EVENT_REMOTE_CREATED \u003d \u0027remote_created\u0027"},{"line_number":85,"context_line":"EVENT_LOCAL_UPDATED \u003d \u0027local_updated\u0027"},{"line_number":86,"context_line":"EVENT_REMOTE_UPDATED \u003d \u0027remote_updated\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_65d0e3f8","line":83,"range":{"start_line":83,"start_character":5,"end_line":83,"end_character":6},"updated":"2017-05-15 12:26:16.000000000","message":"maybe xxx_LP_LOCAL_xxx?","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2f1da1b500dd79e3a542871503347bd433b9275a","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# LogicalPort events"},{"line_number":83,"context_line":"EVENT_LOCAL_CREATED \u003d \u0027local_created\u0027"},{"line_number":84,"context_line":"EVENT_REMOTE_CREATED \u003d \u0027remote_created\u0027"},{"line_number":85,"context_line":"EVENT_LOCAL_UPDATED \u003d \u0027local_updated\u0027"},{"line_number":86,"context_line":"EVENT_REMOTE_UPDATED \u003d \u0027remote_updated\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_c471bd0e","line":83,"range":{"start_line":83,"start_character":5,"end_line":83,"end_character":6},"in_reply_to":"1f013ff3_4ba6ffc3","updated":"2017-05-17 05:48:54.000000000","message":"The module is l2, which is not exactly LogicalPort, so the event name does not clearly imply LogicalPort event.","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"09273982d699db40df038f6752232078e9c16f5a","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"# LogicalPort events"},{"line_number":83,"context_line":"EVENT_LOCAL_CREATED \u003d \u0027local_created\u0027"},{"line_number":84,"context_line":"EVENT_REMOTE_CREATED \u003d \u0027remote_created\u0027"},{"line_number":85,"context_line":"EVENT_LOCAL_UPDATED \u003d \u0027local_updated\u0027"},{"line_number":86,"context_line":"EVENT_REMOTE_UPDATED \u003d \u0027remote_updated\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f013ff3_4ba6ffc3","line":83,"range":{"start_line":83,"start_character":5,"end_line":83,"end_character":6},"in_reply_to":"1f013ff3_65d0e3f8","updated":"2017-05-16 06:52:43.000000000","message":"Could you please explain why?\n\nEverything is scoped. The usage will be e.g.:\n@register_event(l2.LogicalPort, l2.EVENT_REMOTE_CREATED).\n\nI think this is clear enough without cluttering the event name.","commit_id":"3a3d5075648dcaa6e0f3639b0f7c7b75e4f2dc68"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"f374b5ddb77e3de3e507414869167e7bb48a394b","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        is_local \u003d getattr(self, \u0027is_local\u0027, None)"},{"line_number":168,"context_line":"        db_store_inst \u003d db_store2.get_instance()"},{"line_number":169,"context_line":"        original_lport \u003d db_store_inst.get_one(self)"},{"line_number":170,"context_line":"        # XXX(oanson) This should be done in df_local_controller, not here:"},{"line_number":171,"context_line":"        db_store_inst.update(self)"},{"line_number":172,"context_line":"        if original_lport is None:"},{"line_number":173,"context_line":"            LOG.info(\"Adding new logical port \u003d %s\", self)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_53cc4dbb","line":170,"range":{"start_line":170,"start_character":10,"end_line":170,"end_character":13},"updated":"2017-05-17 08:32:50.000000000","message":"XXX?","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"53d060a782cf1f78abddf3189a3799106d13a378","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        is_local \u003d getattr(self, \u0027is_local\u0027, None)"},{"line_number":168,"context_line":"        db_store_inst \u003d db_store2.get_instance()"},{"line_number":169,"context_line":"        original_lport \u003d db_store_inst.get_one(self)"},{"line_number":170,"context_line":"        # XXX(oanson) This should be done in df_local_controller, not here:"},{"line_number":171,"context_line":"        db_store_inst.update(self)"},{"line_number":172,"context_line":"        if original_lport is None:"},{"line_number":173,"context_line":"            LOG.info(\"Adding new logical port \u003d %s\", self)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f013ff3_bdcc7b61","line":170,"range":{"start_line":170,"start_character":10,"end_line":170,"end_character":13},"in_reply_to":"1f013ff3_53cc4dbb","updated":"2017-05-18 18:15:13.000000000","message":"This should be resolved for bug 1690775. Will add to comment","commit_id":"5e0ed80beeadf5cafef60b6995ac5322e51bce74"}],"dragonflow/tests/unit/test_app_base.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"59a7fa1e202a92c2a507c9a1dea3642398f6f3f7","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        cfg.CONF.set_override(\u0027apps_list\u0027, self.apps_list, group\u003d\u0027df\u0027)"},{"line_number":39,"context_line":"        super(DFAppTestBase, self).setUp()"},{"line_number":40,"context_line":"        mock.patch(\u0027ryu.base.app_manager.AppManager.get_instance\u0027).start()"},{"line_number":41,"context_line":"        mod_flow \u003d mock.patch("},{"line_number":42,"context_line":"            \u0027dragonflow.controller.df_base_app.DFlowApp.mod_flow\u0027).start()"},{"line_number":43,"context_line":"        add_flow_go_to_table_mock_patch \u003d mock.patch("},{"line_number":44,"context_line":"            \u0027dragonflow.controller.df_base_app.DFlowApp.add_flow_go_to_table\u0027)"},{"line_number":45,"context_line":"        add_flow_go_to_table \u003d add_flow_go_to_table_mock_patch.start()"},{"line_number":46,"context_line":"        execute \u003d mock.patch(\u0027neutron.agent.common.utils.execute\u0027).start()"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # CLear old objects from cache"},{"line_number":49,"context_line":"        db_store2._instance \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_afad389c","line":46,"range":{"start_line":41,"start_character":0,"end_line":46,"end_character":74},"updated":"2017-04-27 06:59:45.000000000","message":"This (and the block below) should probably be done somewhere else","commit_id":"266db5ccf816d3f8512607197f7109076992df24"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"59a7fa1e202a92c2a507c9a1dea3642398f6f3f7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.controller.db_store2.update(fake_chassis1)"},{"line_number":71,"context_line":"        self.controller.db_store2.update(fake_chassis2)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        mod_flow.reset_mock()"},{"line_number":74,"context_line":"        add_flow_go_to_table.reset_mock()"},{"line_number":75,"context_line":"        execute.reset_mock()"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def tearDown(self):"},{"line_number":78,"context_line":"        for model in model_framework.iter_models(False):"},{"line_number":79,"context_line":"            model.clear_registered_callbacks()"},{"line_number":80,"context_line":"        super(DFAppTestBase, self).tearDown()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"fake_logical_router_ports \u003d [l3.LogicalRouterPort(network\u003d\"10.0.0.1/24\","},{"line_number":83,"context_line":"                                                  lswitch\u003d\"fake_switch1\","}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_8f96fc4b","line":80,"range":{"start_line":73,"start_character":0,"end_line":80,"end_character":45},"updated":"2017-04-27 06:59:45.000000000","message":"Same here re: do somewhere else","commit_id":"266db5ccf816d3f8512607197f7109076992df24"}]}
