)]}'
{"ovn_octavia_provider/driver.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6879797fd3d8edd58e9e25a6b95c047341b429e5","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                # Set LB protocol to undefined only if there are no more"},{"line_number":1237,"context_line":"                # listeners and pools defined in the LB."},{"line_number":1238,"context_line":"                cmds, lb_to_delete \u003d self._clean_lb_if_empty("},{"line_number":1239,"context_line":"                    ovn_lb, listener[\u0027loadbalancer_id\u0027], external_ids)"},{"line_number":1240,"context_line":"                commands.extend(cmds)"},{"line_number":1241,"context_line":"                # Do not refresh vips if OVN LB for given protocol"},{"line_number":1242,"context_line":"                # has pending delete operation."}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_573e418b","line":1239,"updated":"2020-03-06 02:56:32.000000000","message":"Another way to do this is to not return a flag, and just make this \u0027clean_cmds \u003d self._clean_lb_if_empty(...)\u0027, then just check \u0027if not clean_cmds\u0027 below since if it\u0027s empty there\u0027s nothing to clean.","commit_id":"af2b26afe68645e33e2fb7e14e8afe6c7bc2063c"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"b0f95c9c60e1b73f75c3649422fba0505985d08d","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                # Set LB protocol to undefined only if there are no more"},{"line_number":1237,"context_line":"                # listeners and pools defined in the LB."},{"line_number":1238,"context_line":"                cmds, lb_to_delete \u003d self._clean_lb_if_empty("},{"line_number":1239,"context_line":"                    ovn_lb, listener[\u0027loadbalancer_id\u0027], external_ids)"},{"line_number":1240,"context_line":"                commands.extend(cmds)"},{"line_number":1241,"context_line":"                # Do not refresh vips if OVN LB for given protocol"},{"line_number":1242,"context_line":"                # has pending delete operation."}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_9e9a91b6","line":1239,"in_reply_to":"1fa4df85_573e418b","updated":"2020-03-06 08:05:16.000000000","message":"I\u0027ll need to modify the method _clean_lb_if_empty() then, to not clean the protocol in case only one row is defined:\n\nself.ovn_nbdb_api.db_set(\n\u0027Load_Balancer\u0027, ovn_lb.uuid, (\u0027protocol\u0027, [])))\n\nAnd clean it only when the delete were not added to the txn.","commit_id":"af2b26afe68645e33e2fb7e14e8afe6c7bc2063c"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"c0d0899b74dce7312e353c5339ec305365e98688","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                # Set LB protocol to undefined only if there are no more"},{"line_number":1237,"context_line":"                # listeners and pools defined in the LB."},{"line_number":1238,"context_line":"                cmds, lb_to_delete \u003d self._clean_lb_if_empty("},{"line_number":1239,"context_line":"                    ovn_lb, listener[\u0027loadbalancer_id\u0027], external_ids)"},{"line_number":1240,"context_line":"                commands.extend(cmds)"},{"line_number":1241,"context_line":"                # Do not refresh vips if OVN LB for given protocol"},{"line_number":1242,"context_line":"                # has pending delete operation."}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_ba112caf","line":1239,"in_reply_to":"1fa4df85_9e9a91b6","updated":"2020-03-13 12:26:20.000000000","message":"Function _clean_lb_if_empty() does more than one thing.\n\nIt can:\n* remove OVN LB when there is nothing left defined using particular protocol in Octavia\n* clear protocol field, if there is only one LB left and we don\u0027t have listeners /pools defined in the Octavia\n\nSo we cannot just check if there are commands returned by the function. We could verify if withing returned commands there is one related to *delete* of the OVN LB. But I got some issues with validating it in unit/functional tests (mock types etc).\n\nSo *I think* using flag for now is the easiest way? What do you think Brian?","commit_id":"af2b26afe68645e33e2fb7e14e8afe6c7bc2063c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"dac96f2f5fa7e8cdc6bb4242f823bae3c45bae1e","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"                # Set LB protocol to undefined only if there are no more"},{"line_number":1237,"context_line":"                # listeners and pools defined in the LB."},{"line_number":1238,"context_line":"                cmds, lb_to_delete \u003d self._clean_lb_if_empty("},{"line_number":1239,"context_line":"                    ovn_lb, listener[\u0027loadbalancer_id\u0027], external_ids)"},{"line_number":1240,"context_line":"                commands.extend(cmds)"},{"line_number":1241,"context_line":"                # Do not refresh vips if OVN LB for given protocol"},{"line_number":1242,"context_line":"                # has pending delete operation."}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_53bc9eba","line":1239,"in_reply_to":"1fa4df85_ba112caf","updated":"2020-03-13 19:46:46.000000000","message":"Yes, that seems easiest, didn\u0027t see that leg of code when looking at this.","commit_id":"af2b26afe68645e33e2fb7e14e8afe6c7bc2063c"}]}
