)]}'
{"octavia_tempest_plugin/common/constants.py":[{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"da523fba9ed9aad51916790c8768905fab98c334","unresolved":false,"context_lines":[{"line_number":60,"context_line":"LB_ALGORITHM_SOURCE_IP \u003d \u0027SOURCE_IP\u0027"},{"line_number":61,"context_line":"LB_ALGORITHM_SOURCE_IP_PORT \u003d \u0027SOURCE_IP_PORT\u0027"},{"line_number":62,"context_line":"SUPPORTED_LB_ALGORITHMS \u003d {"},{"line_number":63,"context_line":"    \u0027default\u0027: [LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":64,"context_line":"                LB_ALGORITHM_LEAST_CONNECTIONS,"},{"line_number":65,"context_line":"                LB_ALGORITHM_SOURCE_IP],"},{"line_number":66,"context_line":"    \u0027octavia\u0027: [LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":67,"context_line":"                LB_ALGORITHM_LEAST_CONNECTIONS,"},{"line_number":68,"context_line":"                LB_ALGORITHM_SOURCE_IP],"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_85b007de","line":65,"range":{"start_line":63,"start_character":15,"end_line":65,"end_character":39},"updated":"2019-12-10 09:33:48.000000000","message":"I would add a SUPPORTED_LB_ALGORITHMS_AMPHORA list with those values and use it as values for \u0027amphora\u0027, \u0027amphorav2\u0027, and \u0027octavia\u0027 keys in SUPPORTED_LB_ALGORITHMS","commit_id":"2a1e7b53401fde329016d9271acd9e643578e47e"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"fa6f040f3db67558907c6cb052efb5b93166b67c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"LB_ALGORITHM_SOURCE_IP \u003d \u0027SOURCE_IP\u0027"},{"line_number":61,"context_line":"LB_ALGORITHM_SOURCE_IP_PORT \u003d \u0027SOURCE_IP_PORT\u0027"},{"line_number":62,"context_line":"SUPPORTED_LB_ALGORITHMS \u003d {"},{"line_number":63,"context_line":"    \u0027default\u0027: [LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":64,"context_line":"                LB_ALGORITHM_LEAST_CONNECTIONS,"},{"line_number":65,"context_line":"                LB_ALGORITHM_SOURCE_IP],"},{"line_number":66,"context_line":"    \u0027octavia\u0027: [LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":67,"context_line":"                LB_ALGORITHM_LEAST_CONNECTIONS,"},{"line_number":68,"context_line":"                LB_ALGORITHM_SOURCE_IP],"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_807c7571","line":65,"range":{"start_line":63,"start_character":15,"end_line":65,"end_character":39},"in_reply_to":"3fa7e38b_85b007de","updated":"2019-12-10 10:20:12.000000000","message":"Ok, that makes sense. I\u0027ll update the patch. Thanks for the review!","commit_id":"2a1e7b53401fde329016d9271acd9e643578e47e"}],"octavia_tempest_plugin/config.py":[{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"a1949088d7c6203b7a25024d5355e2000d96a84a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                default\u003d{\u0027amphora\u0027: \u0027The Octavia Amphora driver.\u0027,"},{"line_number":112,"context_line":"                         \u0027octavia\u0027: \u0027Deprecated alias of the Octavia Amphora \u0027"},{"line_number":113,"context_line":"                         \u0027driver.\u0027}),"},{"line_number":114,"context_line":"    cfg.StrOpt(\u0027load_balancing_algorithm\u0027,"},{"line_number":115,"context_line":"               default\u003dconst.LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":116,"context_line":"               choices\u003d[const.LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":117,"context_line":"                        const.LB_ALGORITHM_SOURCE_IP,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_d42dcca8","line":114,"updated":"2019-07-25 09:40:46.000000000","message":"It would be better to define a new constant, SUPPORTED_LB_ALGORITHMS, and use it here instead.\n\nFor example, see https://review.opendev.org/#/c/672005/3/octavia_tempest_plugin/config.py","commit_id":"c2b6664b4ff6f0a0dc90b0a715485cc15217b158"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"13b9346db9f0a342c4dfa02edd8a9e4d22fa08f1","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                default\u003d{\u0027amphora\u0027: \u0027The Octavia Amphora driver.\u0027,"},{"line_number":112,"context_line":"                         \u0027octavia\u0027: \u0027Deprecated alias of the Octavia Amphora \u0027"},{"line_number":113,"context_line":"                         \u0027driver.\u0027}),"},{"line_number":114,"context_line":"    cfg.StrOpt(\u0027load_balancing_algorithm\u0027,"},{"line_number":115,"context_line":"               default\u003dconst.LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":116,"context_line":"               choices\u003d[const.LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":117,"context_line":"                        const.LB_ALGORITHM_SOURCE_IP,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_637207b0","line":114,"in_reply_to":"7faddb67_d42dcca8","updated":"2019-07-26 13:12:52.000000000","message":"Done","commit_id":"c2b6664b4ff6f0a0dc90b0a715485cc15217b158"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"aa8b53bf6816df3f3726b3a144ad7abe7f585b67","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                         \u0027topology. One of: SINGLE - One amphora per load \u0027"},{"line_number":128,"context_line":"                         \u0027balancer. ACTIVE_STANDBY - Two amphora per load \u0027"},{"line_number":129,"context_line":"                         \u0027balancer.\u0027}),"},{"line_number":130,"context_line":"    cfg.StrOpt(\u0027load_balancing_algorithm\u0027,"},{"line_number":131,"context_line":"               default\u003dconst.LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":132,"context_line":"               choices\u003dconst.SUPPORTED_LB_ALGORITHMS,"},{"line_number":133,"context_line":"               help\u003d\u0027LB algorithm to be used during test.\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_4196a3f2","line":130,"updated":"2019-10-10 16:09:42.000000000","message":"Frankly I don\u0027t like this as we should be testing them all.\nI would really rather we skip tests or execute tests based on the provider configured or \"discovery\" from the API returning \"not implemented\".\nBasing it on provider is likely more practical.","commit_id":"aec9b555b89c77f8e58bf82e9d1fcca172957867"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"f00035f501dec3f08d75e70e0a44244fd84a858e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                         \u0027topology. One of: SINGLE - One amphora per load \u0027"},{"line_number":128,"context_line":"                         \u0027balancer. ACTIVE_STANDBY - Two amphora per load \u0027"},{"line_number":129,"context_line":"                         \u0027balancer.\u0027}),"},{"line_number":130,"context_line":"    cfg.StrOpt(\u0027load_balancing_algorithm\u0027,"},{"line_number":131,"context_line":"               default\u003dconst.LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":132,"context_line":"               choices\u003dconst.SUPPORTED_LB_ALGORITHMS,"},{"line_number":133,"context_line":"               help\u003d\u0027LB algorithm to be used during test.\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_9f404fa7","line":130,"in_reply_to":"3fa7e38b_4196a3f2","updated":"2019-10-14 08:27:01.000000000","message":"I understand your point and I know that is not the best solution.\n\nFor now all the tests have ROUND_ROBIN algorithm hardcoded. That makes OVN tests not possible to successfully run (all the tests will be failing). My goal here is to enable this possibility by configuring this switch option.\n\nIf we would have discovery mechanism that would need significant work across the whole tempest plugin. I don\u0027t know if we\u0027re able to it now, as first we would like to have tempest test coverage in OVN.\n\nCan we accept this particular change and work further on making this more provider-driver driven? You\u0027ll have my sword.","commit_id":"aec9b555b89c77f8e58bf82e9d1fcca172957867"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"260b2f185ce9ddc9e06d8db5a50a1fb69f5d52eb","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                         \u0027topology. One of: SINGLE - One amphora per load \u0027"},{"line_number":128,"context_line":"                         \u0027balancer. ACTIVE_STANDBY - Two amphora per load \u0027"},{"line_number":129,"context_line":"                         \u0027balancer.\u0027}),"},{"line_number":130,"context_line":"    cfg.StrOpt(\u0027load_balancing_algorithm\u0027,"},{"line_number":131,"context_line":"               default\u003dconst.LB_ALGORITHM_ROUND_ROBIN,"},{"line_number":132,"context_line":"               choices\u003dconst.SUPPORTED_LB_ALGORITHMS,"},{"line_number":133,"context_line":"               help\u003d\u0027LB algorithm to be used during test.\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_6275ba31","line":130,"in_reply_to":"3fa7e38b_9f404fa7","updated":"2019-10-14 09:22:20.000000000","message":"IIUC based on Michael\u0027s feedback we have 3 options:\n\n1) Skip the tests\n2) Execute tests based on the provider\n3) Discovery\n\n1) is undesired from my point of view. I\u0027d like to have this patch in rather than skipping the tests and default it to \u0027ALL\u0027.\n3) seems complicated but perhaps it\u0027s the solution we should tend to in the long term so definitely worth to explore.\n2) seems the most feasible one to me at this point but not sure what it takes.","commit_id":"aec9b555b89c77f8e58bf82e9d1fcca172957867"}],"octavia_tempest_plugin/tests/test_base.py":[{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"5cc9624b4b7f98bf8ee6f707a92951f14a5859fa","unresolved":false,"context_lines":[{"line_number":878,"context_line":"        self.assertEqual(traffic_member_count, len(response_counts))"},{"line_number":879,"context_line":""},{"line_number":880,"context_line":"        # Ensure both members got the same number of responses"},{"line_number":881,"context_line":"        if CONF.load_balancer.provider !\u003d \u0027ovn\u0027:"},{"line_number":882,"context_line":"            self.assertEqual(1, len(set(response_counts.values())))"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"    def assertConsistentResponse(self, response, url, method\u003d\u0027GET\u0027, repeat\u003d10,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_7412ff64","line":881,"updated":"2019-07-23 11:18:37.000000000","message":"Tempest tests are expected to be provider agnostic.","commit_id":"afe00259d6681363c90b3a717974ac768e87ab69"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"22aa8cb7ce8b0a93058d2158cf69a4a90a86b16e","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        self.assertEqual(traffic_member_count, len(response_counts))"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        # Ensure both members got the same number of responses"},{"line_number":883,"context_line":"        if lb_algorithm \u003d\u003d const.LB_ALGORITHM_ROUND_ROBIN:"},{"line_number":884,"context_line":"            self.assertEqual(1, len(set(response_counts.values())))"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    def assertConsistentResponse(self, response, url, method\u003d\u0027GET\u0027, repeat\u003d10,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_3f1a7bcb","line":883,"updated":"2019-09-26 14:52:57.000000000","message":"What is the expected response count from a load balancer on, say, SOURCE_IP_PORT algorithm? Could you please add an assertion for that algorithm too?","commit_id":"2d1edef09fe04f2392e8f44f95ba42cc91716f8f"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3007e11b6123e6cc7c979c6c17cef517111de3bd","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        self.assertEqual(traffic_member_count, len(response_counts))"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        # Ensure both members got the same number of responses"},{"line_number":883,"context_line":"        if lb_algorithm \u003d\u003d const.LB_ALGORITHM_ROUND_ROBIN:"},{"line_number":884,"context_line":"            self.assertEqual(1, len(set(response_counts.values())))"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    def assertConsistentResponse(self, response, url, method\u003d\u0027GET\u0027, repeat\u003d10,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_ae3f1185","line":883,"in_reply_to":"3fa7e38b_3f1a7bcb","updated":"2019-09-27 09:55:40.000000000","message":"Lets consider an example. We have LB with SOURCE_IP_PORT balancing algorithm and 2 members.\n\nSOURCE_IP_PORT algorithm is used and tempest is configured to not reuse connections [0]:\na) With number of 20 HTTP requests we\u0027re sure that both members gets hit, we can calculate it: \n\n1 - (0.5)^20 \u003d 1 - 9.53674316e-7., so we\u0027re sure :) (99.99+%)\n\nb) It is very likely that both members haven\u0027t the same number of responses\n\nWHY: If there is a new hash in member selector (the port is not being reused, because there is new source port) member is selected randomly from the pool. So, from probabilistic point of view there is a possibility that this code could fail:\n\nself.assertEqual(2, len(set(response_counts.values())))\n\nBut it is very unlikely, from what I think it will be around:(0.5)^20, so: 9.53674316e-7 (correct me if I\u0027m wrong).\n\nSo I\u0027ll add this check:\nself.assertEqual(2, len(set(response_counts.values())))\n\n\n[0] https://review.opendev.org/#/c/672976/","commit_id":"2d1edef09fe04f2392e8f44f95ba42cc91716f8f"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"415eac49c361833e67522264d42af4e4ea621caa","unresolved":false,"context_lines":[{"line_number":882,"context_line":"        if lb_algorithm \u003d\u003d const.LB_ALGORITHM_ROUND_ROBIN:"},{"line_number":883,"context_line":"            # Ensure both members got the same number of responses"},{"line_number":884,"context_line":"            self.assertEqual(1, len(set(response_counts.values())))"},{"line_number":885,"context_line":"        elif lb_algorithm \u003d\u003d const.LB_ALGORITHM_SOURCE_IP_PORT:"},{"line_number":886,"context_line":"            # Ensure members didn\u0027t get the same number of responses"},{"line_number":887,"context_line":"            self.assertNotEqual(1, len(set(response_counts.values())))"},{"line_number":888,"context_line":""},{"line_number":889,"context_line":"    def assertConsistentResponse(self, response, url, method\u003d\u0027GET\u0027, repeat\u003d10,"},{"line_number":890,"context_line":"                                 redirect\u003dFalse, timeout\u003d2, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_7cb09d8c","line":887,"range":{"start_line":885,"start_character":7,"end_line":887,"end_character":70},"updated":"2019-10-03 07:14:03.000000000","message":"Unfortunately this check sometime is True, sometime is False. As per my previous comment around this code - members are randomly selected when there is no hash that identifies previous packets. So we base on possibilities here, and we cannot guarantee that number of responses will be equal or not for all the members during all the runs.\n\nI\u0027m dropping it. The gate run when it failed:\n\nhttps://storage.bhs1.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_c57/589712/84/check/ovn-octavia-v2-dsvm-scenario/c57f057/testr_results.html.gz","commit_id":"cace89a4d38273b85e5d6061ed9c7f953569fc7c"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"d43149b01f2fbeb119313a82c296cece61dd2602","unresolved":false,"context_lines":[{"line_number":882,"context_line":"        if lb_algorithm \u003d\u003d const.LB_ALGORITHM_ROUND_ROBIN:"},{"line_number":883,"context_line":"            # Ensure both members got the same number of responses"},{"line_number":884,"context_line":"            self.assertEqual(1, len(set(response_counts.values())))"},{"line_number":885,"context_line":"        elif lb_algorithm \u003d\u003d const.LB_ALGORITHM_SOURCE_IP_PORT:"},{"line_number":886,"context_line":"            # Ensure members didn\u0027t get the same number of responses"},{"line_number":887,"context_line":"            self.assertNotEqual(1, len(set(response_counts.values())))"},{"line_number":888,"context_line":""},{"line_number":889,"context_line":"    def assertConsistentResponse(self, response, url, method\u003d\u0027GET\u0027, repeat\u003d10,"},{"line_number":890,"context_line":"                                 redirect\u003dFalse, timeout\u003d2, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_1c35e9f7","line":887,"range":{"start_line":885,"start_character":7,"end_line":887,"end_character":70},"in_reply_to":"3fa7e38b_7cb09d8c","updated":"2019-10-03 07:22:01.000000000","message":"Test result when this check passed:\nhttps://af07d74c6a8f5efce78e-afa604494fc2482114bddb703b16513e.ssl.cf5.rackcdn.com/589712/81/check/ovn-octavia-v2-dsvm-scenario/5820be6/testr_results.html.gz","commit_id":"cace89a4d38273b85e5d6061ed9c7f953569fc7c"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"4d9446117f52fc31968bd4d5fcac9f046e49ab45","unresolved":false,"context_lines":[{"line_number":879,"context_line":"        # Ensure the correct number of members"},{"line_number":880,"context_line":"        self.assertEqual(traffic_member_count, len(response_counts))"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        if lb_algorithm \u003d\u003d const.LB_ALGORITHM_ROUND_ROBIN:"},{"line_number":883,"context_line":"            # Ensure both members got the same number of responses"},{"line_number":884,"context_line":"            self.assertEqual(1, len(set(response_counts.values())))"},{"line_number":885,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_30b413d1","line":882,"updated":"2019-10-10 14:27:13.000000000","message":"Lets change the logic here, to change it only for SOURCE_IP_PORT.","commit_id":"c16e4cfeeaf04cd695c82cfaf4ec79ef9606b05d"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"11020f7f68144ce9f2d14bff585ba81aa62a1fa0","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                \"specified if test_subnet_override is used.\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        # Set default algorithms."},{"line_number":149,"context_line":"        cls.provider_lb_algorithms \u003d const.SUPPORTED_LB_ALGORITHMS"},{"line_number":150,"context_line":"        cls.lb_algorithm \u003d const.SUPPORTED_LB_ALGORITHMS[0]"},{"line_number":151,"context_line":"        # Get loadbalancing algorithms supported by provider driver."},{"line_number":152,"context_line":"        provider \u003d CONF.load_balancer.provider"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_63ac1cee","line":149,"range":{"start_line":149,"start_character":12,"end_line":149,"end_character":34},"updated":"2019-12-05 15:23:42.000000000","message":"I don\u0027t see any other uses of provider_lb_algorithms outside of this block, I think we can remove it.","commit_id":"257442bc2bd3bb7ecb13daf3bf78b1e68902bd4b"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"1c0823c8091c226ee0e0011af1e2001e977819d4","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                \"specified if test_subnet_override is used.\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        # Set default algorithms."},{"line_number":149,"context_line":"        cls.provider_lb_algorithms \u003d const.SUPPORTED_LB_ALGORITHMS"},{"line_number":150,"context_line":"        cls.lb_algorithm \u003d const.SUPPORTED_LB_ALGORITHMS[0]"},{"line_number":151,"context_line":"        # Get loadbalancing algorithms supported by provider driver."},{"line_number":152,"context_line":"        provider \u003d CONF.load_balancer.provider"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_2c04c97d","line":149,"range":{"start_line":149,"start_character":12,"end_line":149,"end_character":34},"in_reply_to":"3fa7e38b_63ac1cee","updated":"2019-12-06 09:11:43.000000000","message":"Yes, that could be removed.","commit_id":"257442bc2bd3bb7ecb13daf3bf78b1e68902bd4b"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"11020f7f68144ce9f2d14bff585ba81aa62a1fa0","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            # If case of error fallback to default ones configured globally."},{"line_number":165,"context_line":"            LOG.debug(\u0027Cannot find supported algorithm within \u0027"},{"line_number":166,"context_line":"                      \u0027provider driver %s\u0027 % CONF.load_balancer.provider)"},{"line_number":167,"context_line":"            cls.provider_lb_algorithms \u003d const.SUPPORTED_LB_ALGORITHMS"},{"line_number":168,"context_line":"            cls.lb_algorithm \u003d const.SUPPORTED_LB_ALGORITHMS[0]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        show_subnet \u003d cls.lb_mem_subnet_client.show_subnet"},{"line_number":171,"context_line":"        if CONF.load_balancer.test_with_noop:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_03876863","line":168,"range":{"start_line":167,"start_character":0,"end_line":168,"end_character":63},"updated":"2019-12-05 15:23:42.000000000","message":"if we remove provider_lb_algorithms, we can remove both lines and safely rely on defaults that have been defined line 150","commit_id":"257442bc2bd3bb7ecb13daf3bf78b1e68902bd4b"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"1c0823c8091c226ee0e0011af1e2001e977819d4","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            # If case of error fallback to default ones configured globally."},{"line_number":165,"context_line":"            LOG.debug(\u0027Cannot find supported algorithm within \u0027"},{"line_number":166,"context_line":"                      \u0027provider driver %s\u0027 % CONF.load_balancer.provider)"},{"line_number":167,"context_line":"            cls.provider_lb_algorithms \u003d const.SUPPORTED_LB_ALGORITHMS"},{"line_number":168,"context_line":"            cls.lb_algorithm \u003d const.SUPPORTED_LB_ALGORITHMS[0]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        show_subnet \u003d cls.lb_mem_subnet_client.show_subnet"},{"line_number":171,"context_line":"        if CONF.load_balancer.test_with_noop:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_ccf4158a","line":168,"range":{"start_line":167,"start_character":0,"end_line":168,"end_character":63},"in_reply_to":"3fa7e38b_03876863","updated":"2019-12-06 09:11:43.000000000","message":"Ok, in this particular case yes.\nIn future, if we would loop over possible algorithms per provider, this variable (or similar) could be there.","commit_id":"257442bc2bd3bb7ecb13daf3bf78b1e68902bd4b"},{"author":{"_account_id":6469,"name":"Carlos Gonçalves","display_name":"Carlos Goncalves","email":"cgoncalves@redhat.com","username":"cgoncalves"},"change_message_id":"74030b3947bbcf27267d7e3dc5d0f75569822134","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            algorithms \u003d const.SUPPORTED_LB_ALGORITHMS["},{"line_number":151,"context_line":"                CONF.load_balancer.provider]"},{"line_number":152,"context_line":"        except KeyError:"},{"line_number":153,"context_line":"            algorithms \u003d const.SUPPORTED_LB_ALGORITHMS[\u0027default\u0027]"},{"line_number":154,"context_line":"        # Set default algorithm as first from the list."},{"line_number":155,"context_line":"        cls.lb_algorithm \u003d algorithms[0]"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_1fac0d35","line":152,"range":{"start_line":152,"start_character":8,"end_line":152,"end_character":24},"updated":"2019-12-16 15:56:36.000000000","message":"I\u0027m not a fan of handling things like this.\n\nSomething like following would be nicer:\n\n    const.SUPPORTED_LB_ALGORITHMS.get(CONF.load_balancer.provider, const.SUPPORTED_LB_ALGORITHMS[\u0027default\u0027])[0]\n\nor\n\n    algo \u003d const.SUPPORTED_LB_ALGORITHMS.get(CONF.load_balancer.provider) or const.SUPPORTED_LB_ALGORITHMS[\u0027default\u0027])\n    cls.lb_algorithm \u003d algo[0]\n\n\nbut pep8 acceptable :P","commit_id":"b6df5f8143c7e0831c49e9ae4344de4f11a6e227"}]}
