)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"1f120e1d501e20d98667f7c9d60e0d073a636016","unresolved":false,"context_lines":[{"line_number":13,"context_line":"2. the whole method become longer currently, so it\u0027s better to divide"},{"line_number":14,"context_line":"it into several methods."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"3. In fullstack, there are some places input the unnecessary args when"},{"line_number":17,"context_line":"trying to create a network by neutron client because it has already"},{"line_number":18,"context_line":"defined the default args."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I20e73a5af5ad80749cc4bdf13a8a0cd5647139f9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da36d5c6_bc72c6e3","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":25},"updated":"2017-02-21 01:44:48.000000000","message":"it is something not related to the title of this commit, maybe move to another patch?","commit_id":"1cd3d610bf1bd2e8b7d67f4efbb45ca7b5a62849"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e673f1ea8eac6a46947e491d132be6a3dcad95f3","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        return True"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _set_lport_external_value_by_lswitch(self, lswitch, lport):"},{"line_number":212,"context_line":"        if not lswitch:"},{"line_number":213,"context_line":"            LOG.warning(_LW(\"Could not find lswitch for lport: %s\"),"},{"line_number":214,"context_line":"                        lport.get_id())"},{"line_number":215,"context_line":"            return None"},{"line_number":216,"context_line":"        lswitch_unique_key \u003d lswitch.get_unique_key()"},{"line_number":217,"context_line":"        network_type \u003d lswitch.get_network_type()"},{"line_number":218,"context_line":"        segment_id \u003d lswitch.get_segment_id()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_d49bcac7","line":215,"range":{"start_line":212,"start_character":1,"end_line":215,"end_character":23},"updated":"2017-02-21 08:53:40.000000000","message":"I think this check is better suited to line 250","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"79e56e1dcd839a799242be4b363922e5d92c7026","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        return True"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _set_lport_external_value_by_lswitch(self, lswitch, lport):"},{"line_number":212,"context_line":"        if not lswitch:"},{"line_number":213,"context_line":"            LOG.warning(_LW(\"Could not find lswitch for lport: %s\"),"},{"line_number":214,"context_line":"                        lport.get_id())"},{"line_number":215,"context_line":"            return None"},{"line_number":216,"context_line":"        lswitch_unique_key \u003d lswitch.get_unique_key()"},{"line_number":217,"context_line":"        network_type \u003d lswitch.get_network_type()"},{"line_number":218,"context_line":"        segment_id \u003d lswitch.get_segment_id()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_f407ee7e","line":215,"range":{"start_line":212,"start_character":1,"end_line":215,"end_character":23},"in_reply_to":"da36d5c6_d49bcac7","updated":"2017-02-21 09:15:30.000000000","message":"I just want to encap the check code into this method, so that _logical_port_process will be shorter and I think it ok to put it in or outside:)","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e673f1ea8eac6a46947e491d132be6a3dcad95f3","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        network_type \u003d lswitch.get_network_type()"},{"line_number":218,"context_line":"        segment_id \u003d lswitch.get_segment_id()"},{"line_number":219,"context_line":"        physical_network \u003d lswitch.get_physical_network()"},{"line_number":220,"context_line":"        if not lswitch_unique_key or not network_type:"},{"line_number":221,"context_line":"            LOG.warning(_LW(\"There are invalid properties in lswitch: %s\"),"},{"line_number":222,"context_line":"                        lswitch.get_id())"},{"line_number":223,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_f4852e59","line":220,"range":{"start_line":220,"start_character":8,"end_line":220,"end_character":54},"updated":"2017-02-21 08:53:40.000000000","message":"On what occasion we won\u0027t have unique key or network type on the object?","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e673f1ea8eac6a46947e491d132be6a3dcad95f3","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        network_type \u003d lswitch.get_network_type()"},{"line_number":218,"context_line":"        segment_id \u003d lswitch.get_segment_id()"},{"line_number":219,"context_line":"        physical_network \u003d lswitch.get_physical_network()"},{"line_number":220,"context_line":"        if not lswitch_unique_key or not network_type:"},{"line_number":221,"context_line":"            LOG.warning(_LW(\"There are invalid properties in lswitch: %s\"),"},{"line_number":222,"context_line":"                        lswitch.get_id())"},{"line_number":223,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_74abfed6","line":220,"range":{"start_line":220,"start_character":15,"end_line":220,"end_character":33},"updated":"2017-02-21 08:53:40.000000000","message":"This is true for unique_key \u003d 0","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"79e56e1dcd839a799242be4b363922e5d92c7026","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        network_type \u003d lswitch.get_network_type()"},{"line_number":218,"context_line":"        segment_id \u003d lswitch.get_segment_id()"},{"line_number":219,"context_line":"        physical_network \u003d lswitch.get_physical_network()"},{"line_number":220,"context_line":"        if not lswitch_unique_key or not network_type:"},{"line_number":221,"context_line":"            LOG.warning(_LW(\"There are invalid properties in lswitch: %s\"),"},{"line_number":222,"context_line":"                        lswitch.get_id())"},{"line_number":223,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_9407921b","line":220,"range":{"start_line":220,"start_character":15,"end_line":220,"end_character":33},"in_reply_to":"da36d5c6_74abfed6","updated":"2017-02-21 09:15:30.000000000","message":"ok thx","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"79e56e1dcd839a799242be4b363922e5d92c7026","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        network_type \u003d lswitch.get_network_type()"},{"line_number":218,"context_line":"        segment_id \u003d lswitch.get_segment_id()"},{"line_number":219,"context_line":"        physical_network \u003d lswitch.get_physical_network()"},{"line_number":220,"context_line":"        if not lswitch_unique_key or not network_type:"},{"line_number":221,"context_line":"            LOG.warning(_LW(\"There are invalid properties in lswitch: %s\"),"},{"line_number":222,"context_line":"                        lswitch.get_id())"},{"line_number":223,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_d4958ae4","line":220,"range":{"start_line":220,"start_character":8,"end_line":220,"end_character":54},"in_reply_to":"da36d5c6_f4852e59","updated":"2017-02-21 09:15:30.000000000","message":"network type is an optional field when create network, what\u0027s more, in some exception the happen in north or df db that make the field empty, here is just a necessary protection.","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e673f1ea8eac6a46947e491d132be6a3dcad95f3","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        if lport.get_remote_vtep():"},{"line_number":234,"context_line":"            # Remote port that exists in other network pod."},{"line_number":235,"context_line":"            lport.set_external_value(\u0027peer_vtep_address\u0027,"},{"line_number":236,"context_line":"                                     lport.get_chassis())"},{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            # Remote port that exists in current network pod."},{"line_number":239,"context_line":"            remote_chassis \u003d self.db_store.get_chassis(lport.get_chassis())"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_f477ee9c","line":236,"range":{"start_line":236,"start_character":37,"end_line":236,"end_character":57},"updated":"2017-02-21 08:53:40.000000000","message":"Shouldn\u0027t we set an IP here?","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"79e56e1dcd839a799242be4b363922e5d92c7026","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        if lport.get_remote_vtep():"},{"line_number":234,"context_line":"            # Remote port that exists in other network pod."},{"line_number":235,"context_line":"            lport.set_external_value(\u0027peer_vtep_address\u0027,"},{"line_number":236,"context_line":"                                     lport.get_chassis())"},{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            # Remote port that exists in current network pod."},{"line_number":239,"context_line":"            remote_chassis \u003d self.db_store.get_chassis(lport.get_chassis())"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_7485beab","line":236,"range":{"start_line":236,"start_character":37,"end_line":236,"end_character":57},"in_reply_to":"da36d5c6_f477ee9c","updated":"2017-02-21 09:15:30.000000000","message":"yes, it\u0027s an IP here, you can check it in the mech driver code:)","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e673f1ea8eac6a46947e491d132be6a3dcad95f3","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        if not self._set_lport_external_value_by_lswitch(lswitch, lport):"},{"line_number":252,"context_line":"            return"},{"line_number":253,"context_line":"        chassis \u003d lport.get_chassis()"},{"line_number":254,"context_line":"        if chassis \u003d\u003d self.chassis_name:"},{"line_number":255,"context_line":"            lport.set_external_value(\u0027is_local\u0027, True)"},{"line_number":256,"context_line":"            self.db_store.set_port(lport.get_id(), lport, True)"},{"line_number":257,"context_line":"            ofport \u003d self.vswitch_api.get_port_ofport_by_id(lport.get_id())"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_34f7c6f6","line":254,"range":{"start_line":254,"start_character":7,"end_line":254,"end_character":40},"updated":"2017-02-21 08:53:40.000000000","message":"Maybe we can split this method into \u0027process local port\u0027 and \u0027process remote port\u0027 for simplicity.","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"79e56e1dcd839a799242be4b363922e5d92c7026","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        if not self._set_lport_external_value_by_lswitch(lswitch, lport):"},{"line_number":252,"context_line":"            return"},{"line_number":253,"context_line":"        chassis \u003d lport.get_chassis()"},{"line_number":254,"context_line":"        if chassis \u003d\u003d self.chassis_name:"},{"line_number":255,"context_line":"            lport.set_external_value(\u0027is_local\u0027, True)"},{"line_number":256,"context_line":"            self.db_store.set_port(lport.get_id(), lport, True)"},{"line_number":257,"context_line":"            ofport \u003d self.vswitch_api.get_port_ofport_by_id(lport.get_id())"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_1445626f","line":254,"range":{"start_line":254,"start_character":7,"end_line":254,"end_character":40},"in_reply_to":"da36d5c6_34f7c6f6","updated":"2017-02-21 09:15:30.000000000","message":"Good idea","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"e673f1ea8eac6a46947e491d132be6a3dcad95f3","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                lport.get_external_value(\u0027network_type\u0027))"},{"line_number":281,"context_line":"            if ofport:"},{"line_number":282,"context_line":"                lport.set_external_value(\u0027ofport\u0027, ofport)"},{"line_number":283,"context_line":"                if not original_lport:"},{"line_number":284,"context_line":"                    LOG.info(_LI(\"Adding new remote logical port \u003d %s\"), lport)"},{"line_number":285,"context_line":"                    self.open_flow_app.notify_add_remote_port(lport)"},{"line_number":286,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_941eb261","line":283,"range":{"start_line":283,"start_character":16,"end_line":283,"end_character":38},"updated":"2017-02-21 08:53:40.000000000","message":"If we\u0027re checking here whether original_port was passed or not, I think \u0027is None\u0027 is a better condition. Same for several other if conditions above and below.","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"79e56e1dcd839a799242be4b363922e5d92c7026","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                lport.get_external_value(\u0027network_type\u0027))"},{"line_number":281,"context_line":"            if ofport:"},{"line_number":282,"context_line":"                lport.set_external_value(\u0027ofport\u0027, ofport)"},{"line_number":283,"context_line":"                if not original_lport:"},{"line_number":284,"context_line":"                    LOG.info(_LI(\"Adding new remote logical port \u003d %s\"), lport)"},{"line_number":285,"context_line":"                    self.open_flow_app.notify_add_remote_port(lport)"},{"line_number":286,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_f41b6e7e","line":283,"range":{"start_line":283,"start_character":16,"end_line":283,"end_character":38},"in_reply_to":"da36d5c6_941eb261","updated":"2017-02-21 09:15:30.000000000","message":"As an object return by cache or df db, I think \"if not object\" is better, as for \"\", [], set(), {} situation, if the return value is a digit such as version or lswitch unique key, \"if object is None\" is better.","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"a231fc11d24a6c80b678e70befc3d7780ff877c5","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                lport.get_external_value(\u0027network_type\u0027))"},{"line_number":281,"context_line":"            if ofport:"},{"line_number":282,"context_line":"                lport.set_external_value(\u0027ofport\u0027, ofport)"},{"line_number":283,"context_line":"                if not original_lport:"},{"line_number":284,"context_line":"                    LOG.info(_LI(\"Adding new remote logical port \u003d %s\"), lport)"},{"line_number":285,"context_line":"                    self.open_flow_app.notify_add_remote_port(lport)"},{"line_number":286,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_7ea64b11","line":283,"range":{"start_line":283,"start_character":16,"end_line":283,"end_character":38},"in_reply_to":"da36d5c6_f41b6e7e","updated":"2017-02-22 13:04:13.000000000","message":"If we never expect original_port to be a collection, there is no reason to check it for emptiness, and if it is a collection by any chance, I think its better to fail with exception than to let it pass silently.","commit_id":"c1992e901030990d2f3a8902b100b430d0cbedbf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"6c9e7c8c4139cabb314ea848fd5e7c99d4ce5185","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        network_type \u003d lswitch.get_network_type()"},{"line_number":218,"context_line":"        segment_id \u003d lswitch.get_segment_id()"},{"line_number":219,"context_line":"        physical_network \u003d lswitch.get_physical_network()"},{"line_number":220,"context_line":"        if lswitch_unique_key is None or not network_type:"},{"line_number":221,"context_line":"            LOG.warning(_LW(\"There are invalid properties in lswitch: %s\"),"},{"line_number":222,"context_line":"                        lswitch.get_id())"},{"line_number":223,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_ded9f784","line":220,"range":{"start_line":220,"start_character":41,"end_line":220,"end_character":57},"updated":"2017-02-22 13:03:54.000000000","message":"If network type is optional, missing network type should be denoted by None. If it is an empty string, it is a bug. This hides it.","commit_id":"48c26b2d9dfe5e95489653feacdc720a15ba9da5"},{"author":{"_account_id":18347,"name":"Itamar Ofek","email":"itamofek@netscape.net","username":"itamaro"},"change_message_id":"69a0369ac3305ac7b085b2078bfdf484dbecea77","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def _remote_lport_process(self, lport, original_lport):"},{"line_number":271,"context_line":"        lport.set_external_value(\u0027is_local\u0027, False)"},{"line_number":272,"context_line":"        self.db_store.set_port(lport.get_id(), lport, False)"},{"line_number":273,"context_line":"        if not self._set_lport_peer_vtep_address(lport):"},{"line_number":274,"context_line":"            return True"},{"line_number":275,"context_line":"        ofport \u003d self.vswitch_api.get_vtp_ofport("},{"line_number":276,"context_line":"            lport.get_external_value(\u0027network_type\u0027))"},{"line_number":277,"context_line":"        if ofport:"}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_dec65748","line":274,"range":{"start_line":273,"start_character":0,"end_line":274,"end_character":23},"updated":"2017-02-22 13:00:58.000000000","message":"Please make all checks in initalization step.\nIn a highlevel parent function, \nThe check looks missplaced, as set should never fail.\nThe comment is code wide.","commit_id":"48c26b2d9dfe5e95489653feacdc720a15ba9da5"}]}
