)]}'
{"networking_ovn/octavia/ovn_driver.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                          ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY))"},{"line_number":297,"context_line":"        return router, network"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _is_lb_empty(self, external_ids):"},{"line_number":300,"context_line":"        \"\"\"Checks if there is no pool or listener defined."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        This checks if there is no pool or listener defined"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_4ad8e9ee","line":299,"range":{"start_line":299,"start_character":21,"end_line":299,"end_character":27},"updated":"2019-12-09 16:48:11.000000000","message":"nit: you\u0027re not using this, it could be staticmethod","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c424de4438f10365671b17032f8d5cd63d6c58f3","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                          ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY))"},{"line_number":297,"context_line":"        return router, network"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _is_lb_empty(self, external_ids):"},{"line_number":300,"context_line":"        \"\"\"Checks if there is no pool or listener defined."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        This checks if there is no pool or listener defined"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_3664e7e4","line":299,"range":{"start_line":299,"start_character":21,"end_line":299,"end_character":27},"in_reply_to":"3fa7e38b_4ad8e9ee","updated":"2019-12-10 12:53:54.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        return router, network"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _is_lb_empty(self, external_ids):"},{"line_number":300,"context_line":"        \"\"\"Checks if there is no pool or listener defined."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        This checks if there is no pool or listener defined"},{"line_number":303,"context_line":"        in loadbalancer external_ids."}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_0db9ab14","line":300,"range":{"start_line":300,"start_character":11,"end_line":300,"end_character":17},"updated":"2019-12-09 16:48:11.000000000","message":"nit: docstring should be in imperative form: https://www.python.org/dev/peps/pep-0257/","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c424de4438f10365671b17032f8d5cd63d6c58f3","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        return router, network"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _is_lb_empty(self, external_ids):"},{"line_number":300,"context_line":"        \"\"\"Checks if there is no pool or listener defined."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        This checks if there is no pool or listener defined"},{"line_number":303,"context_line":"        in loadbalancer external_ids."}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_36a947dc","line":300,"range":{"start_line":300,"start_character":11,"end_line":300,"end_character":17},"in_reply_to":"3fa7e38b_0db9ab14","updated":"2019-12-10 12:53:54.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8935b1d8be356f3a100a82728bf614aa07c6700b","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        This checks if there is no pool or listener defined"},{"line_number":303,"context_line":"        in loadbalancer external_ids."},{"line_number":304,"context_line":"        \"\"\""},{"line_number":305,"context_line":"        if True in [k.startswith(\u0027listener\u0027) or k.startswith(\u0027pool\u0027)"},{"line_number":306,"context_line":"                    for k in external_ids]:"},{"line_number":307,"context_line":"            return False"},{"line_number":308,"context_line":"        return True"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _clean_lb_if_empty(self, ovn_lb, lb_id, external_ids):"},{"line_number":311,"context_line":"        commands \u003d []"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_8d77db8e","line":308,"range":{"start_line":305,"start_character":0,"end_line":308,"end_character":19},"updated":"2019-12-09 16:23:41.000000000","message":"Can be written as:\n\nreturn not any([k.startswith ...])","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        This checks if there is no pool or listener defined"},{"line_number":303,"context_line":"        in loadbalancer external_ids."},{"line_number":304,"context_line":"        \"\"\""},{"line_number":305,"context_line":"        if True in [k.startswith(\u0027listener\u0027) or k.startswith(\u0027pool\u0027)"},{"line_number":306,"context_line":"                    for k in external_ids]:"},{"line_number":307,"context_line":"            return False"},{"line_number":308,"context_line":"        return True"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _clean_lb_if_empty(self, ovn_lb, lb_id, external_ids):"},{"line_number":311,"context_line":"        commands \u003d []"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_ca5ff972","line":308,"range":{"start_line":305,"start_character":0,"end_line":308,"end_character":19},"updated":"2019-12-09 16:48:11.000000000","message":"return not any([k.startswith(\u0027listener\u0027) or k.startswith(\u0027pool\u0027)\n                for k in external_ids])","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c424de4438f10365671b17032f8d5cd63d6c58f3","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        This checks if there is no pool or listener defined"},{"line_number":303,"context_line":"        in loadbalancer external_ids."},{"line_number":304,"context_line":"        \"\"\""},{"line_number":305,"context_line":"        if True in [k.startswith(\u0027listener\u0027) or k.startswith(\u0027pool\u0027)"},{"line_number":306,"context_line":"                    for k in external_ids]:"},{"line_number":307,"context_line":"            return False"},{"line_number":308,"context_line":"        return True"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _clean_lb_if_empty(self, ovn_lb, lb_id, external_ids):"},{"line_number":311,"context_line":"        commands \u003d []"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_767c9f70","line":308,"range":{"start_line":305,"start_character":0,"end_line":308,"end_character":19},"in_reply_to":"3fa7e38b_ca5ff972","updated":"2019-12-10 12:53:54.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        This function searches for the LoadBalancer whose Name has the pattern"},{"line_number":481,"context_line":"        passed in lb_id."},{"line_number":482,"context_line":"        Input: String format of LoadBalancer ID provided by Octavia in its API"},{"line_number":483,"context_line":"               request. Note that OVN saves the above ID in the \u0027name\u0027 column."},{"line_number":484,"context_line":"        Output: LoadBalancer row matching the lb_id"},{"line_number":485,"context_line":"        Exception: RowNotFound can be generated if the LoadBalancer is not"},{"line_number":486,"context_line":"                   found."}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_6dd7ff50","line":483,"updated":"2019-12-09 16:48:11.000000000","message":"You may want to add protocol here in the docstring.","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c424de4438f10365671b17032f8d5cd63d6c58f3","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        This function searches for the LoadBalancer whose Name has the pattern"},{"line_number":481,"context_line":"        passed in lb_id."},{"line_number":482,"context_line":"        Input: String format of LoadBalancer ID provided by Octavia in its API"},{"line_number":483,"context_line":"               request. Note that OVN saves the above ID in the \u0027name\u0027 column."},{"line_number":484,"context_line":"        Output: LoadBalancer row matching the lb_id"},{"line_number":485,"context_line":"        Exception: RowNotFound can be generated if the LoadBalancer is not"},{"line_number":486,"context_line":"                   found."}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_b608d790","line":483,"in_reply_to":"3fa7e38b_6dd7ff50","updated":"2019-12-10 12:53:54.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"15aeb4913966085c8ab94c31c2c3a90e04dffe43","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        lbs \u003d self.ovn_nbdb_api.db_find_rows("},{"line_number":489,"context_line":"            \u0027Load_Balancer\u0027, (\u0027name\u0027, \u0027\u003d\u0027, lb_id)).execute()"},{"line_number":490,"context_line":"        if not protocol:"},{"line_number":491,"context_line":"            return lbs"},{"line_number":492,"context_line":"        # If there is only one LB without protocol defined, so"},{"line_number":493,"context_line":"        # it is \u0027clean\u0027 LB record without any listener."},{"line_number":494,"context_line":"        if len(lbs) \u003d\u003d 1 and not lbs[0].protocol:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_79a49db8","line":491,"updated":"2019-12-10 02:15:48.000000000","message":"Regarding another comment, if \u0027lbs\u0027 isn\u0027t set here, it should raise like below","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c424de4438f10365671b17032f8d5cd63d6c58f3","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        lbs \u003d self.ovn_nbdb_api.db_find_rows("},{"line_number":489,"context_line":"            \u0027Load_Balancer\u0027, (\u0027name\u0027, \u0027\u003d\u0027, lb_id)).execute()"},{"line_number":490,"context_line":"        if not protocol:"},{"line_number":491,"context_line":"            return lbs"},{"line_number":492,"context_line":"        # If there is only one LB without protocol defined, so"},{"line_number":493,"context_line":"        # it is \u0027clean\u0027 LB record without any listener."},{"line_number":494,"context_line":"        if len(lbs) \u003d\u003d 1 and not lbs[0].protocol:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_b62d37fe","line":491,"in_reply_to":"3fa7e38b_79a49db8","updated":"2019-12-10 12:53:54.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        ovn_lbs \u003d self._find_ovn_lb(lb_id)"},{"line_number":515,"context_line":"        # This shouldn\u0027t happend."},{"line_number":516,"context_line":"        if not ovn_lbs:"},{"line_number":517,"context_line":"            raise idlutils.RowNotFound(table\u003d\u0027Load_Balancer\u0027,"},{"line_number":518,"context_line":"                                       col\u003d\u0027name\u0027, match\u003dlb_id)"},{"line_number":519,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_6d1fff6f","line":516,"updated":"2019-12-09 16:48:11.000000000","message":"As per L485, _find_ovn_lb should raise an exception if not found.","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c424de4438f10365671b17032f8d5cd63d6c58f3","unresolved":false,"context_lines":[{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        ovn_lbs \u003d self._find_ovn_lb(lb_id)"},{"line_number":515,"context_line":"        # This shouldn\u0027t happend."},{"line_number":516,"context_line":"        if not ovn_lbs:"},{"line_number":517,"context_line":"            raise idlutils.RowNotFound(table\u003d\u0027Load_Balancer\u0027,"},{"line_number":518,"context_line":"                                       col\u003d\u0027name\u0027, match\u003dlb_id)"},{"line_number":519,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_d68b13be","line":516,"in_reply_to":"3fa7e38b_6d1fff6f","updated":"2019-12-10 12:53:54.000000000","message":"Done, im deleting this code from here, its moved to _find_ovn_lb()","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"        lbs_with_required_protocol \u003d ["},{"line_number":521,"context_line":"            ovn_lb for ovn_lb in ovn_lbs"},{"line_number":522,"context_line":"            if protocol in ovn_lb.protocol]"},{"line_number":523,"context_line":"        lbs_with_no_protocol \u003d [ovn_lb for ovn_lb in ovn_lbs"},{"line_number":524,"context_line":"                                if not ovn_lb.protocol]"},{"line_number":525,"context_line":"        if not lbs_with_required_protocol and not lbs_with_no_protocol:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_0dc3eb59","line":522,"range":{"start_line":522,"start_character":24,"end_line":522,"end_character":26},"updated":"2019-12-09 16:48:11.000000000","message":"should it be \u0027\u003d\u0027 ? protocol seems to be a string https://github.com/ovn-org/ovn/blob/50fdc3e4cfc487eeb9b81c07d645cf46f4557309/ovn-nb.ovsschema#L151","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"15aeb4913966085c8ab94c31c2c3a90e04dffe43","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"        lbs_with_required_protocol \u003d ["},{"line_number":521,"context_line":"            ovn_lb for ovn_lb in ovn_lbs"},{"line_number":522,"context_line":"            if protocol in ovn_lb.protocol]"},{"line_number":523,"context_line":"        lbs_with_no_protocol \u003d [ovn_lb for ovn_lb in ovn_lbs"},{"line_number":524,"context_line":"                                if not ovn_lb.protocol]"},{"line_number":525,"context_line":"        if not lbs_with_required_protocol and not lbs_with_no_protocol:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_f9972d45","line":522,"range":{"start_line":522,"start_character":24,"end_line":522,"end_character":26},"in_reply_to":"3fa7e38b_0dc3eb59","updated":"2019-12-10 02:15:48.000000000","message":"+1, else http could match https for example","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"b38c9fd2422afbbbcfc8658d18548f6f52f006e1","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"        lbs_with_required_protocol \u003d ["},{"line_number":521,"context_line":"            ovn_lb for ovn_lb in ovn_lbs"},{"line_number":522,"context_line":"            if protocol in ovn_lb.protocol]"},{"line_number":523,"context_line":"        lbs_with_no_protocol \u003d [ovn_lb for ovn_lb in ovn_lbs"},{"line_number":524,"context_line":"                                if not ovn_lb.protocol]"},{"line_number":525,"context_line":"        if not lbs_with_required_protocol and not lbs_with_no_protocol:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_e2676a23","line":522,"range":{"start_line":522,"start_character":24,"end_line":522,"end_character":26},"in_reply_to":"3fa7e38b_96603b0f","updated":"2019-12-10 15:30:17.000000000","message":"Ok, in this particular place it needs to be like I did at the beginning.\n\nthe ovn_lb.protocol is a list with only one parameter. That is what I receive from NBDB.\n\nSo having the statement like:\n\u0027http\u0027 in [\u0027https\u0027] \n\nwill return False, so we are safe.","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c424de4438f10365671b17032f8d5cd63d6c58f3","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"        lbs_with_required_protocol \u003d ["},{"line_number":521,"context_line":"            ovn_lb for ovn_lb in ovn_lbs"},{"line_number":522,"context_line":"            if protocol in ovn_lb.protocol]"},{"line_number":523,"context_line":"        lbs_with_no_protocol \u003d [ovn_lb for ovn_lb in ovn_lbs"},{"line_number":524,"context_line":"                                if not ovn_lb.protocol]"},{"line_number":525,"context_line":"        if not lbs_with_required_protocol and not lbs_with_no_protocol:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_96603b0f","line":522,"range":{"start_line":522,"start_character":24,"end_line":522,"end_character":26},"in_reply_to":"3fa7e38b_f9972d45","updated":"2019-12-10 12:53:54.000000000","message":"Yes, you\u0027re right folks, updated.","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":872,"context_line":"            # In case vip_fip was passed - use it."},{"line_number":873,"context_line":"            vip_fip \u003d loadbalancer.get(LB_EXT_IDS_VIP_FIP_KEY)"},{"line_number":874,"context_line":"            if vip_fip:"},{"line_number":875,"context_line":"                external_ids.update({LB_EXT_IDS_VIP_FIP_KEY: vip_fip})"},{"line_number":876,"context_line":"            # In case of lr_ref passed - use it."},{"line_number":877,"context_line":"            lr_ref \u003d loadbalancer.get(LB_EXT_IDS_LR_REF_KEY)"},{"line_number":878,"context_line":"            if lr_ref:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_0dde8bda","line":875,"range":{"start_line":875,"start_character":16,"end_line":875,"end_character":70},"updated":"2019-12-09 16:48:11.000000000","message":"external_ids[LB_EXT_IDS_VIP_FIP_KEY] \u003d vip_fip","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"eed8349e52e594786e7816c4627984b7df54b25c","unresolved":false,"context_lines":[{"line_number":872,"context_line":"            # In case vip_fip was passed - use it."},{"line_number":873,"context_line":"            vip_fip \u003d loadbalancer.get(LB_EXT_IDS_VIP_FIP_KEY)"},{"line_number":874,"context_line":"            if vip_fip:"},{"line_number":875,"context_line":"                external_ids.update({LB_EXT_IDS_VIP_FIP_KEY: vip_fip})"},{"line_number":876,"context_line":"            # In case of lr_ref passed - use it."},{"line_number":877,"context_line":"            lr_ref \u003d loadbalancer.get(LB_EXT_IDS_LR_REF_KEY)"},{"line_number":878,"context_line":"            if lr_ref:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_5c1c25c1","line":875,"range":{"start_line":875,"start_character":16,"end_line":875,"end_character":70},"in_reply_to":"3fa7e38b_0dde8bda","updated":"2019-12-10 13:56:25.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":876,"context_line":"            # In case of lr_ref passed - use it."},{"line_number":877,"context_line":"            lr_ref \u003d loadbalancer.get(LB_EXT_IDS_LR_REF_KEY)"},{"line_number":878,"context_line":"            if lr_ref:"},{"line_number":879,"context_line":"                external_ids.update({LB_EXT_IDS_LR_REF_KEY: lr_ref})"},{"line_number":880,"context_line":""},{"line_number":881,"context_line":"            self.ovn_nbdb_api.db_create("},{"line_number":882,"context_line":"                \u0027Load_Balancer\u0027, name\u003dloadbalancer[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_2ddb47ea","line":879,"range":{"start_line":879,"start_character":16,"end_line":879,"end_character":68},"updated":"2019-12-09 16:48:11.000000000","message":"ditto","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"eed8349e52e594786e7816c4627984b7df54b25c","unresolved":false,"context_lines":[{"line_number":876,"context_line":"            # In case of lr_ref passed - use it."},{"line_number":877,"context_line":"            lr_ref \u003d loadbalancer.get(LB_EXT_IDS_LR_REF_KEY)"},{"line_number":878,"context_line":"            if lr_ref:"},{"line_number":879,"context_line":"                external_ids.update({LB_EXT_IDS_LR_REF_KEY: lr_ref})"},{"line_number":880,"context_line":""},{"line_number":881,"context_line":"            self.ovn_nbdb_api.db_create("},{"line_number":882,"context_line":"                \u0027Load_Balancer\u0027, name\u003dloadbalancer[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_7c17a19e","line":879,"range":{"start_line":879,"start_character":16,"end_line":879,"end_character":68},"in_reply_to":"3fa7e38b_2ddb47ea","updated":"2019-12-10 13:56:25.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"5347bf20ff1a605c63410b98e29eeaf7044d1501","unresolved":false,"context_lines":[{"line_number":882,"context_line":"                \u0027Load_Balancer\u0027, name\u003dloadbalancer[\u0027id\u0027],"},{"line_number":883,"context_line":"                protocol\u003dprotocol,"},{"line_number":884,"context_line":"                external_ids\u003dexternal_ids"},{"line_number":885,"context_line":"                ).execute(check_error\u003dTrue)"},{"line_number":886,"context_line":"            ovn_lb \u003d self._find_ovn_lb("},{"line_number":887,"context_line":"                loadbalancer[\u0027id\u0027],"},{"line_number":888,"context_line":"                protocol\u003dprotocol)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_4d86c3bc","line":885,"updated":"2019-12-09 16:48:11.000000000","message":"if any of the code below blows for any reason, won\u0027t we end up in inconsistent state where lb is not paired with ls?","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"eed8349e52e594786e7816c4627984b7df54b25c","unresolved":false,"context_lines":[{"line_number":882,"context_line":"                \u0027Load_Balancer\u0027, name\u003dloadbalancer[\u0027id\u0027],"},{"line_number":883,"context_line":"                protocol\u003dprotocol,"},{"line_number":884,"context_line":"                external_ids\u003dexternal_ids"},{"line_number":885,"context_line":"                ).execute(check_error\u003dTrue)"},{"line_number":886,"context_line":"            ovn_lb \u003d self._find_ovn_lb("},{"line_number":887,"context_line":"                loadbalancer[\u0027id\u0027],"},{"line_number":888,"context_line":"                protocol\u003dprotocol)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_1fd1bf57","line":885,"in_reply_to":"3fa7e38b_4d86c3bc","updated":"2019-12-10 13:56:25.000000000","message":"Yes, If the LB would not be created, for any reason, we\u0027ll not even try to set LR or LS associations.","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8935b1d8be356f3a100a82728bf614aa07c6700b","unresolved":false,"context_lines":[{"line_number":905,"context_line":"            if ls_refs:"},{"line_number":906,"context_line":"                try:"},{"line_number":907,"context_line":"                    ls_refs \u003d jsonutils.loads(ls_refs)"},{"line_number":908,"context_line":"                except ValueError:"},{"line_number":909,"context_line":"                    ls_refs \u003d {}"},{"line_number":910,"context_line":"                for ls in ls_refs:"},{"line_number":911,"context_line":"                    # Skip previously added LS because we don\u0027t want"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_ed620fad","line":908,"range":{"start_line":908,"start_character":16,"end_line":908,"end_character":34},"updated":"2019-12-09 16:23:41.000000000","message":"Is ValueError the right exception here ?\n\nCause I don\u0027t remember loads() raising it, I checked the documentation as well and it says otherwise [0]:\n\n\"If the data being deserialized is not a valid JSON document, a JSONDecodeError will be raised.\"\n\n[0] https://docs.python.org/3/library/json.html#json.loads\n\n(oslo serialization just is just a wrapper for json.loads(): https://github.com/openstack/oslo.serialization/blob/bc2a1fb5259e64596a8071a592dc8eb1b6990ae0/oslo_serialization/jsonutils.py#L264)","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c8d36531f2880bad8c8f95ddd9e485ffefac22f4","unresolved":false,"context_lines":[{"line_number":905,"context_line":"            if ls_refs:"},{"line_number":906,"context_line":"                try:"},{"line_number":907,"context_line":"                    ls_refs \u003d jsonutils.loads(ls_refs)"},{"line_number":908,"context_line":"                except ValueError:"},{"line_number":909,"context_line":"                    ls_refs \u003d {}"},{"line_number":910,"context_line":"                for ls in ls_refs:"},{"line_number":911,"context_line":"                    # Skip previously added LS because we don\u0027t want"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_1f4bff86","line":908,"range":{"start_line":908,"start_character":16,"end_line":908,"end_character":34},"in_reply_to":"3fa7e38b_1c4b0d87","updated":"2019-12-10 14:36:03.000000000","message":"I checked it too. It seems JSONDecodeError inherits from ValueError so ValueError should be good here, no?","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d1c8cdd44311b448b5fa7cea2bae2a293e048b54","unresolved":false,"context_lines":[{"line_number":905,"context_line":"            if ls_refs:"},{"line_number":906,"context_line":"                try:"},{"line_number":907,"context_line":"                    ls_refs \u003d jsonutils.loads(ls_refs)"},{"line_number":908,"context_line":"                except ValueError:"},{"line_number":909,"context_line":"                    ls_refs \u003d {}"},{"line_number":910,"context_line":"                for ls in ls_refs:"},{"line_number":911,"context_line":"                    # Skip previously added LS because we don\u0027t want"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_7f2473c3","line":908,"range":{"start_line":908,"start_character":16,"end_line":908,"end_character":34},"in_reply_to":"3fa7e38b_1f4bff86","updated":"2019-12-10 14:37:32.000000000","message":"\u003e\u003e\u003e decoder.JSONDecodeError.__bases__\n(\u003cclass \u0027ValueError\u0027\u003e,)","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"b38c9fd2422afbbbcfc8658d18548f6f52f006e1","unresolved":false,"context_lines":[{"line_number":905,"context_line":"            if ls_refs:"},{"line_number":906,"context_line":"                try:"},{"line_number":907,"context_line":"                    ls_refs \u003d jsonutils.loads(ls_refs)"},{"line_number":908,"context_line":"                except ValueError:"},{"line_number":909,"context_line":"                    ls_refs \u003d {}"},{"line_number":910,"context_line":"                for ls in ls_refs:"},{"line_number":911,"context_line":"                    # Skip previously added LS because we don\u0027t want"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_653064ea","line":908,"range":{"start_line":908,"start_character":16,"end_line":908,"end_character":34},"in_reply_to":"3fa7e38b_7f2473c3","updated":"2019-12-10 15:30:17.000000000","message":"Yey, Jakub won.\nhttps://docs.python.org/3/library/json.html#json.JSONDecodeError\n\nAnd I checked it manually.\n\nstack@octavia-gate:~/networking-ovn$ python3\nPython 3.6.9 (default, Nov  7 2019, 10:44:02)\n[GCC 8.3.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e from oslo_serialization import jsonutils\n\u003e\u003e\u003e try:\n...         jsonutils.loads(\u0027{\u0027)\n... except ValueError:\n...   print(\u0027yes\u0027)\n... \nyes\n\u003e\u003e\u003e","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"eed8349e52e594786e7816c4627984b7df54b25c","unresolved":false,"context_lines":[{"line_number":905,"context_line":"            if ls_refs:"},{"line_number":906,"context_line":"                try:"},{"line_number":907,"context_line":"                    ls_refs \u003d jsonutils.loads(ls_refs)"},{"line_number":908,"context_line":"                except ValueError:"},{"line_number":909,"context_line":"                    ls_refs \u003d {}"},{"line_number":910,"context_line":"                for ls in ls_refs:"},{"line_number":911,"context_line":"                    # Skip previously added LS because we don\u0027t want"}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_1c4b0d87","line":908,"range":{"start_line":908,"start_character":16,"end_line":908,"end_character":34},"in_reply_to":"3fa7e38b_ed620fad","updated":"2019-12-10 13:56:25.000000000","message":"Eagle eye, I checked it manually:\n\u003e\u003e\u003e jsonutils.loads(\u0027{}\u0027)\n{}\n\u003e\u003e\u003e jsonutils.loads(\u0027{\u0027)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/opt/stack/networking-ovn/.tox/py3/lib/python3.6/site-packages/oslo_serialization/jsonutils.py\", line 264, in loads\n    return json.loads(encodeutils.safe_decode(s, encoding), **kwargs)\n  File \"/usr/lib/python3.6/json/__init__.py\", line 354, in loads\n    return _default_decoder.decode(s)\n  File \"/usr/lib/python3.6/json/decoder.py\", line 339, in decode\n    obj, end \u003d self.raw_decode(s, idx\u003d_w(s, 0).end())\n  File \"/usr/lib/python3.6/json/decoder.py\", line 355, in raw_decode\n    obj, end \u003d self.scan_once(s, idx)\njson.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)\n\u003e\u003e\u003e \n\n\nTo that it needs to be updated in several places in this driver. Let me do this.\nIn python2 it raises ValueError. I would need to cherry-pick this code to stable/stein even, so for me would be better to do fallback like:\n\ntry:\n    from json.decoder import JSONDecodeError\nexcept ImportError:\n    JSONDecodeError \u003d ValueError\n\n\nAnd set in try-except block the JSONDecodeError. I\u0027ll update it like this.","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8935b1d8be356f3a100a82728bf614aa07c6700b","unresolved":false,"context_lines":[{"line_number":1012,"context_line":"        if ls_refs:"},{"line_number":1013,"context_line":"            try:"},{"line_number":1014,"context_line":"                ls_refs \u003d jsonutils.loads(ls_refs)"},{"line_number":1015,"context_line":"            except ValueError:"},{"line_number":1016,"context_line":"                ls_refs \u003d {}"},{"line_number":1017,"context_line":"        for ls_name in ls_refs.keys():"},{"line_number":1018,"context_line":"            ovn_ls \u003d self.ovn_nbdb_api.ls_get(ls_name).execute("}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_0dea0bd8","line":1015,"range":{"start_line":1015,"start_character":12,"end_line":1015,"end_character":30},"updated":"2019-12-09 16:23:41.000000000","message":"ditto","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"eed8349e52e594786e7816c4627984b7df54b25c","unresolved":false,"context_lines":[{"line_number":1012,"context_line":"        if ls_refs:"},{"line_number":1013,"context_line":"            try:"},{"line_number":1014,"context_line":"                ls_refs \u003d jsonutils.loads(ls_refs)"},{"line_number":1015,"context_line":"            except ValueError:"},{"line_number":1016,"context_line":"                ls_refs \u003d {}"},{"line_number":1017,"context_line":"        for ls_name in ls_refs.keys():"},{"line_number":1018,"context_line":"            ovn_ls \u003d self.ovn_nbdb_api.ls_get(ls_name).execute("}],"source_content_type":"text/x-python","patch_set":23,"id":"3fa7e38b_bf350bdd","line":1015,"range":{"start_line":1015,"start_character":12,"end_line":1015,"end_character":30},"in_reply_to":"3fa7e38b_0dea0bd8","updated":"2019-12-10 13:56:25.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"fa539130483f7575b0c5b91a3fc67b646c389cbf","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        ovn_lbs \u003d self._find_ovn_lb(lb_id)"},{"line_number":526,"context_line":"        lbs_with_required_protocol \u003d ["},{"line_number":527,"context_line":"            ovn_lb for ovn_lb in ovn_lbs"},{"line_number":528,"context_line":"            if protocol in ovn_lb.protocol]"},{"line_number":529,"context_line":"        lbs_with_no_protocol \u003d [ovn_lb for ovn_lb in ovn_lbs"},{"line_number":530,"context_line":"                                if not ovn_lb.protocol]"},{"line_number":531,"context_line":"        if not lbs_with_required_protocol and not lbs_with_no_protocol:"}],"source_content_type":"text/x-python","patch_set":26,"id":"3fa7e38b_e56a14b3","line":528,"range":{"start_line":528,"start_character":27,"end_line":528,"end_character":43},"updated":"2019-12-10 15:32:14.000000000","message":"ovn_lb.protocol is a one-element list only (don\u0027t ask me why)\nIn those terms the check:\n\u0027http\u0027 in [\u0027https\u0027]\nwill always return False.","commit_id":"aa0e06e66d4b4c2802ab112ec85f4e23fda58b6a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":478,"context_line":"            LOG.error(msg)"},{"line_number":479,"context_line":"            raise driver_exceptions.UpdateStatusError(msg)"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    def _find_ovn_lb(self, lb_id, protocol\u003dNone):"},{"line_number":482,"context_line":"        \"\"\"Find the Loadbalancer in OVN with the given lb_id as its name"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        This function searches for the LoadBalancer whose Name has the pattern"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_d1f1af6b","line":481,"range":{"start_line":481,"start_character":18,"end_line":481,"end_character":20},"updated":"2019-12-12 22:02:06.000000000","message":"nit: lbs since it returns \u003e1 possibly?\n\nthen some things below would need an \u0027s\u0027 added, like Loadbalancers","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"cc4ae3038d7a48ca4be95352980d2ebec8706fe3","unresolved":false,"context_lines":[{"line_number":478,"context_line":"            LOG.error(msg)"},{"line_number":479,"context_line":"            raise driver_exceptions.UpdateStatusError(msg)"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    def _find_ovn_lb(self, lb_id, protocol\u003dNone):"},{"line_number":482,"context_line":"        \"\"\"Find the Loadbalancer in OVN with the given lb_id as its name"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        This function searches for the LoadBalancer whose Name has the pattern"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_0e8ff322","line":481,"range":{"start_line":481,"start_character":18,"end_line":481,"end_character":20},"in_reply_to":"3fa7e38b_d1f1af6b","updated":"2019-12-17 12:38:57.000000000","message":"Yea, you\u0027re right. I\u0027ll add \u0027s\u0027.","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            # Set required protocol here."},{"line_number":564,"context_line":"            self.ovn_nbdb_api.db_set("},{"line_number":565,"context_line":"                \u0027Load_Balancer\u0027, ovn_lb.uuid,"},{"line_number":566,"context_line":"                (\u0027protocol\u0027, protocol)).execute(check_error\u003dTrue)"},{"line_number":567,"context_line":"        # Looks like we\u0027ve just added new LB"},{"line_number":568,"context_line":"        # or updated exising, empty one."},{"line_number":569,"context_line":"        return self._find_ovn_lb("}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_f18cebd8","line":566,"updated":"2019-12-12 22:02:06.000000000","message":"Should the above \"if not ... and not ...\" block just be the \u0027else:\u0027 block here?","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"cc4ae3038d7a48ca4be95352980d2ebec8706fe3","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            # Set required protocol here."},{"line_number":564,"context_line":"            self.ovn_nbdb_api.db_set("},{"line_number":565,"context_line":"                \u0027Load_Balancer\u0027, ovn_lb.uuid,"},{"line_number":566,"context_line":"                (\u0027protocol\u0027, protocol)).execute(check_error\u003dTrue)"},{"line_number":567,"context_line":"        # Looks like we\u0027ve just added new LB"},{"line_number":568,"context_line":"        # or updated exising, empty one."},{"line_number":569,"context_line":"        return self._find_ovn_lb("}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_cee6bbe8","line":566,"in_reply_to":"3fa7e38b_f18cebd8","updated":"2019-12-17 12:38:57.000000000","message":"This function looked strange. Changed to simply if, elif, else.","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":882,"context_line":"            # In case of lr_ref passed - use it."},{"line_number":883,"context_line":"            lr_ref \u003d loadbalancer.get(LB_EXT_IDS_LR_REF_KEY)"},{"line_number":884,"context_line":"            if lr_ref:"},{"line_number":885,"context_line":"                external_ids[LB_EXT_IDS_LR_REF_KEY] \u003d lr_ref"},{"line_number":886,"context_line":""},{"line_number":887,"context_line":"            self.ovn_nbdb_api.db_create("},{"line_number":888,"context_line":"                \u0027Load_Balancer\u0027, name\u003dloadbalancer[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_9143376b","line":885,"updated":"2019-12-12 22:02:06.000000000","message":"Should the try: be below here?  I\u0027m not sure anything above can raise, even get_network_driver()","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"cc4ae3038d7a48ca4be95352980d2ebec8706fe3","unresolved":false,"context_lines":[{"line_number":882,"context_line":"            # In case of lr_ref passed - use it."},{"line_number":883,"context_line":"            lr_ref \u003d loadbalancer.get(LB_EXT_IDS_LR_REF_KEY)"},{"line_number":884,"context_line":"            if lr_ref:"},{"line_number":885,"context_line":"                external_ids[LB_EXT_IDS_LR_REF_KEY] \u003d lr_ref"},{"line_number":886,"context_line":""},{"line_number":887,"context_line":"            self.ovn_nbdb_api.db_create("},{"line_number":888,"context_line":"                \u0027Load_Balancer\u0027, name\u003dloadbalancer[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_f100366c","line":885,"in_reply_to":"3fa7e38b_9143376b","updated":"2019-12-17 12:38:57.000000000","message":"Yes, I also modified try-except blocks other functions that were wrapped by one try-except. That looked bad...","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":892,"context_line":"            ovn_lb \u003d self._find_ovn_lb("},{"line_number":893,"context_line":"                loadbalancer[\u0027id\u0027],"},{"line_number":894,"context_line":"                protocol\u003dprotocol)"},{"line_number":895,"context_line":"            ovn_lb \u003d ovn_lb if protocol else ovn_lb[0]"},{"line_number":896,"context_line":"            commands \u003d self._update_lb_to_ls_association("},{"line_number":897,"context_line":"                ovn_lb, network_id\u003dport[\u0027network_id\u0027],"},{"line_number":898,"context_line":"                associate\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_710ebb3d","line":895,"updated":"2019-12-12 22:02:06.000000000","message":"Is this required?  It looks like _find_ovn_lb returns a single lb if protocol is set, but I could be wrong.","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"cc4ae3038d7a48ca4be95352980d2ebec8706fe3","unresolved":false,"context_lines":[{"line_number":892,"context_line":"            ovn_lb \u003d self._find_ovn_lb("},{"line_number":893,"context_line":"                loadbalancer[\u0027id\u0027],"},{"line_number":894,"context_line":"                protocol\u003dprotocol)"},{"line_number":895,"context_line":"            ovn_lb \u003d ovn_lb if protocol else ovn_lb[0]"},{"line_number":896,"context_line":"            commands \u003d self._update_lb_to_ls_association("},{"line_number":897,"context_line":"                ovn_lb, network_id\u003dport[\u0027network_id\u0027],"},{"line_number":898,"context_line":"                associate\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_4edc0be1","line":895,"in_reply_to":"3fa7e38b_710ebb3d","updated":"2019-12-17 12:38:57.000000000","message":"protocol is passed to this function and the default is None, So there is possibility that it will return a list or a singe row.","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":953,"context_line":""},{"line_number":954,"context_line":"    def lb_delete(self, loadbalancer):"},{"line_number":955,"context_line":"        port_id \u003d None"},{"line_number":956,"context_line":"        try:"},{"line_number":957,"context_line":"            status \u003d {\u0027loadbalancers\u0027: [{\"id\": loadbalancer[\u0027id\u0027],"},{"line_number":958,"context_line":"                                         \"provisioning_status\": \"DELETED\","},{"line_number":959,"context_line":"                                         \"operating_status\": \"OFFLINE\"}],"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_8c06c01a","line":956,"updated":"2019-12-12 22:02:06.000000000","message":"This can at least move to L971 I think","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"cc4ae3038d7a48ca4be95352980d2ebec8706fe3","unresolved":false,"context_lines":[{"line_number":953,"context_line":""},{"line_number":954,"context_line":"    def lb_delete(self, loadbalancer):"},{"line_number":955,"context_line":"        port_id \u003d None"},{"line_number":956,"context_line":"        try:"},{"line_number":957,"context_line":"            status \u003d {\u0027loadbalancers\u0027: [{\"id\": loadbalancer[\u0027id\u0027],"},{"line_number":958,"context_line":"                                         \"provisioning_status\": \"DELETED\","},{"line_number":959,"context_line":"                                         \"operating_status\": \"OFFLINE\"}],"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_11ddd212","line":956,"in_reply_to":"3fa7e38b_8c06c01a","updated":"2019-12-17 12:38:57.000000000","message":"Yes. that looks bad. I moved it.","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":1205,"context_line":""},{"line_number":1206,"context_line":"            ovn_lb \u003d self._find_ovn_lb("},{"line_number":1207,"context_line":"                listener[\u0027loadbalancer_id\u0027],"},{"line_number":1208,"context_line":"                protocol\u003dlistener[\u0027protocol\u0027])"},{"line_number":1209,"context_line":"            l_key_when_enabled \u003d self._get_listener_key(listener[\u0027id\u0027])"},{"line_number":1210,"context_line":"            l_key_when_disabled \u003d self._get_listener_key("},{"line_number":1211,"context_line":"                listener[\u0027id\u0027], is_enabled\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_0c597027","line":1208,"updated":"2019-12-12 22:02:06.000000000","message":"You could have a try/except around this like above, then limit the scope if the other try to a smaller scope below.  That could probably apply other places so I can do it in a follow-on.","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"cc4ae3038d7a48ca4be95352980d2ebec8706fe3","unresolved":false,"context_lines":[{"line_number":1205,"context_line":""},{"line_number":1206,"context_line":"            ovn_lb \u003d self._find_ovn_lb("},{"line_number":1207,"context_line":"                listener[\u0027loadbalancer_id\u0027],"},{"line_number":1208,"context_line":"                protocol\u003dlistener[\u0027protocol\u0027])"},{"line_number":1209,"context_line":"            l_key_when_enabled \u003d self._get_listener_key(listener[\u0027id\u0027])"},{"line_number":1210,"context_line":"            l_key_when_disabled \u003d self._get_listener_key("},{"line_number":1211,"context_line":"                listener[\u0027id\u0027], is_enabled\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_ae99ff1e","line":1208,"in_reply_to":"3fa7e38b_0c597027","updated":"2019-12-17 12:38:57.000000000","message":"++ lemme Lemme do it in [1] because im doing there similar things. Thanks for finding it!\n\n\n[1] https://review.opendev.org/#/c/698745/","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"53a7f4b7a4253af95219c1c9ee7786dd6b83d6e0","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        try:"},{"line_number":1240,"context_line":"            commands \u003d []"},{"line_number":1241,"context_line":"            new_l_key \u003d None"},{"line_number":1242,"context_line":"            l_key_to_remove \u003d None"},{"line_number":1243,"context_line":"            if \u0027admin_state_up\u0027 in listener:"},{"line_number":1244,"context_line":"                if listener[\u0027admin_state_up\u0027]:"},{"line_number":1245,"context_line":"                    # We need to enable the listener"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_bae12b00","line":1242,"updated":"2019-12-17 23:24:13.000000000","message":"super nit: these 3 could be outside try, don\u0027t respin for it","commit_id":"d73e19754cf1135b141e12d7e5f024ac316c82c5"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"bec9494a930e17d75bd05f1d5b985a3d16243e0f","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        try:"},{"line_number":1240,"context_line":"            commands \u003d []"},{"line_number":1241,"context_line":"            new_l_key \u003d None"},{"line_number":1242,"context_line":"            l_key_to_remove \u003d None"},{"line_number":1243,"context_line":"            if \u0027admin_state_up\u0027 in listener:"},{"line_number":1244,"context_line":"                if listener[\u0027admin_state_up\u0027]:"},{"line_number":1245,"context_line":"                    # We need to enable the listener"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_d7f7838b","line":1242,"in_reply_to":"3fa7e38b_bae12b00","updated":"2020-01-08 08:54:41.000000000","message":"Ok, waiting for review, if somebody will find something else I\u0027ll update :)","commit_id":"d73e19754cf1135b141e12d7e5f024ac316c82c5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"53a7f4b7a4253af95219c1c9ee7786dd6b83d6e0","unresolved":false,"context_lines":[{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"                if l_key_to_remove:"},{"line_number":1260,"context_line":"                    commands.append("},{"line_number":1261,"context_line":"                        self.ovn_nbdb_api.db_remove("},{"line_number":1262,"context_line":"                            \u0027Load_Balancer\u0027, ovn_lb.uuid, \u0027external_ids\u0027,"},{"line_number":1263,"context_line":"                            (l_key_to_remove))"},{"line_number":1264,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_7aebb3dc","line":1261,"updated":"2019-12-17 23:24:13.000000000","message":"And i\u0027m guessing this is the first place that could raise, so try is good","commit_id":"d73e19754cf1135b141e12d7e5f024ac316c82c5"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"26cf21a98a6fb41a6a526dc989f700161b678422","unresolved":false,"context_lines":[{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"                if l_key_to_remove:"},{"line_number":1260,"context_line":"                    commands.append("},{"line_number":1261,"context_line":"                        self.ovn_nbdb_api.db_remove("},{"line_number":1262,"context_line":"                            \u0027Load_Balancer\u0027, ovn_lb.uuid, \u0027external_ids\u0027,"},{"line_number":1263,"context_line":"                            (l_key_to_remove))"},{"line_number":1264,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_d71f8306","line":1261,"in_reply_to":"3fa7e38b_7aebb3dc","updated":"2020-01-08 10:42:13.000000000","message":"I don\u0027t think it raises here as it just creates the command but doesn\u0027t execute.","commit_id":"d73e19754cf1135b141e12d7e5f024ac316c82c5"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"bec9494a930e17d75bd05f1d5b985a3d16243e0f","unresolved":false,"context_lines":[{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"                if l_key_to_remove:"},{"line_number":1260,"context_line":"                    commands.append("},{"line_number":1261,"context_line":"                        self.ovn_nbdb_api.db_remove("},{"line_number":1262,"context_line":"                            \u0027Load_Balancer\u0027, ovn_lb.uuid, \u0027external_ids\u0027,"},{"line_number":1263,"context_line":"                            (l_key_to_remove))"},{"line_number":1264,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":30,"id":"3fa7e38b_37fdb76c","line":1261,"in_reply_to":"3fa7e38b_7aebb3dc","updated":"2020-01-08 08:54:41.000000000","message":"Yes.","commit_id":"d73e19754cf1135b141e12d7e5f024ac316c82c5"}],"networking_ovn/tests/functional/octavia/test_ovn_driver.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import copy"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"from neutron.common import utils as n_utils"},{"line_number":20,"context_line":"from neutron_lib.plugins import directory"},{"line_number":21,"context_line":"from octavia_lib.api.drivers import data_models as octavia_data_model"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_ac829c50","line":18,"updated":"2019-12-12 22:02:06.000000000","message":"nit: can\u0027t mock be copy\u0027s friend in the above block? :)","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d9483f088a8fe048d9454c33aceae394d020a9d9","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                if (observed_lb.get(\u0027name\u0027) \u003d\u003d"},{"line_number":205,"context_line":"                        expected_lb.get(\u0027name\u0027) and"},{"line_number":206,"context_line":"                    observed_lb.get(\u0027protocol\u0027) \u003d\u003d"},{"line_number":207,"context_line":"                        expected_lb.get(\u0027protocol\u0027)):"},{"line_number":208,"context_line":"                    self.assertEqual(expected_lb, observed_lb)"},{"line_number":209,"context_line":"                    found \u003d True"},{"line_number":210,"context_line":"            if not found:"}],"source_content_type":"text/x-python","patch_set":28,"id":"3fa7e38b_6cc6e49e","line":207,"updated":"2019-12-12 22:02:06.000000000","message":"nit: could make an observed_lb set of (name, protocol) then just check expected (name, protocol) in the set, but this is only a test so performance doesn\u0027t matter","commit_id":"40d3ff4bf54162654419cd15f26c55b5efc38e62"}],"releasenotes/notes/ovn-octavia-provider-driver-multiple-protocols-4a93e184b8f374c7.yaml":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8935b1d8be356f3a100a82728bf614aa07c6700b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    OVN Octavia provider driver now supports both TCP and UDP"},{"line_number":5,"context_line":"    pool/listener protocols configured in the same Octavia Load Balancer."}],"source_content_type":"text/x-yaml","patch_set":23,"id":"3fa7e38b_eda3efaf","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":9},"updated":"2019-12-09 16:23:41.000000000","message":"Note, if we want to backport it to stable branches I would consider this a bug fix and not a feature since as per guide [0] we can\u0027t backport new features.\n\n[0] https://docs.openstack.org/project-team-guide/stable-branches.html#review-guidelines","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"eed8349e52e594786e7816c4627984b7df54b25c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    OVN Octavia provider driver now supports both TCP and UDP"},{"line_number":5,"context_line":"    pool/listener protocols configured in the same Octavia Load Balancer."}],"source_content_type":"text/x-yaml","patch_set":23,"id":"3fa7e38b_7f40f332","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":9},"in_reply_to":"3fa7e38b_eda3efaf","updated":"2019-12-10 13:56:25.000000000","message":"Done","commit_id":"926ef4f38d662779d1eca5668ed3147b3f7ffa3a"}]}
