)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"746cc18b902a9f07dfaf3136b48992ae158b3133","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"eaf32217_68a9684e","updated":"2023-12-20 15:17:03.000000000","message":"Look nice, but some extra optimizations can be made to take advantage of the new fields","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"132d3dc27f19a8b2a9c742ce71096c7d35288e14","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"4454dee1_ef27f6f0","updated":"2024-02-02 10:58:25.000000000","message":"I\u0027m fine with either option, so if you prefer the current one, I\u0027ll push it","commit_id":"ae89854d4938febcf591a8b819d29a5b52922e13"}],"ovn_bgp_agent/drivers/openstack/utils/ovn.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"746cc18b902a9f07dfaf3136b48992ae158b3133","unresolved":true,"context_lines":[{"line_number":770,"context_line":"            lb \u003d self.get_ovn_lb(lb_name)"},{"line_number":771,"context_line":"            if not lb:"},{"line_number":772,"context_line":"                continue"},{"line_number":773,"context_line":"            lb_dp \u003d helpers.get_lb_datapath_group(lb)"},{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            # assume all the members are connected through the same router"},{"line_number":778,"context_line":"            # so only one datapath needs to be checked"},{"line_number":779,"context_line":"            router_lrps \u003d self.get_lrps_for_datapath(lb_dp[0])"},{"line_number":780,"context_line":"            for lrp in router_lrps:"},{"line_number":781,"context_line":"                router_lrp_dp \u003d self.get_port_datapath(lrp)"},{"line_number":782,"context_line":"                if router_lrp_dp \u003d\u003d router_dp:"},{"line_number":783,"context_line":"                    lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":784,"context_line":"                    lbs[lb.name] \u003d lb_ip"},{"line_number":785,"context_line":"                    break"},{"line_number":786,"context_line":"        return lbs"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"    def get_ovn_vip_port(self, name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"2e79fdfc_044f48b6","line":785,"range":{"start_line":773,"start_character":1,"end_line":785,"end_character":20},"updated":"2023-12-20 15:17:03.000000000","message":"same as before, the logic here is to obtain the matching router DP, if we can get this directly, perhaps this can be enhanced and we don\u0027t need to iterate over the lrps on the datapath","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a8f78151f8e66a259e0d39632550b2ce9b8ac19a","unresolved":true,"context_lines":[{"line_number":770,"context_line":"            lb \u003d self.get_ovn_lb(lb_name)"},{"line_number":771,"context_line":"            if not lb:"},{"line_number":772,"context_line":"                continue"},{"line_number":773,"context_line":"            lb_dp \u003d helpers.get_lb_datapath_group(lb)"},{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            # assume all the members are connected through the same router"},{"line_number":778,"context_line":"            # so only one datapath needs to be checked"},{"line_number":779,"context_line":"            router_lrps \u003d self.get_lrps_for_datapath(lb_dp[0])"},{"line_number":780,"context_line":"            for lrp in router_lrps:"},{"line_number":781,"context_line":"                router_lrp_dp \u003d self.get_port_datapath(lrp)"},{"line_number":782,"context_line":"                if router_lrp_dp \u003d\u003d router_dp:"},{"line_number":783,"context_line":"                    lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":784,"context_line":"                    lbs[lb.name] \u003d lb_ip"},{"line_number":785,"context_line":"                    break"},{"line_number":786,"context_line":"        return lbs"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"    def get_ovn_vip_port(self, name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ffb4a52_8e4471e1","line":785,"range":{"start_line":773,"start_character":1,"end_line":785,"end_character":20},"in_reply_to":"2e79fdfc_044f48b6","updated":"2024-01-30 13:37:51.000000000","message":"Just sent another patch-set from what I understood from the logic here, because router_dp itself is just used to match the lrp_dp and if it does then we populate the \"lbs\" dict, so I assumed that if we can get the router_dp from lr_datapath_group we should skip this loop and populate the \"lbs\" dict directly.","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aba82458de822d67405cad5bbc256f7017499341","unresolved":false,"context_lines":[{"line_number":770,"context_line":"            lb \u003d self.get_ovn_lb(lb_name)"},{"line_number":771,"context_line":"            if not lb:"},{"line_number":772,"context_line":"                continue"},{"line_number":773,"context_line":"            lb_dp \u003d helpers.get_lb_datapath_group(lb)"},{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            # assume all the members are connected through the same router"},{"line_number":778,"context_line":"            # so only one datapath needs to be checked"},{"line_number":779,"context_line":"            router_lrps \u003d self.get_lrps_for_datapath(lb_dp[0])"},{"line_number":780,"context_line":"            for lrp in router_lrps:"},{"line_number":781,"context_line":"                router_lrp_dp \u003d self.get_port_datapath(lrp)"},{"line_number":782,"context_line":"                if router_lrp_dp \u003d\u003d router_dp:"},{"line_number":783,"context_line":"                    lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":784,"context_line":"                    lbs[lb.name] \u003d lb_ip"},{"line_number":785,"context_line":"                    break"},{"line_number":786,"context_line":"        return lbs"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"    def get_ovn_vip_port(self, name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"2ff7027e_58507972","line":785,"range":{"start_line":773,"start_character":1,"end_line":785,"end_character":20},"in_reply_to":"9ffb4a52_8e4471e1","updated":"2024-02-02 10:26:36.000000000","message":"Done","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"cba2ed8a2356771eebda3e4c798e2f5933ce135f","unresolved":true,"context_lines":[{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            if lr_dp:"},{"line_number":778,"context_line":"                lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":779,"context_line":"                lbs[lb.name] \u003d lb_ip"},{"line_number":780,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a01283a_19376ee2","line":777,"range":{"start_line":777,"start_character":0,"end_line":777,"end_character":21},"updated":"2024-02-02 10:15:41.000000000","message":"this should also check if router_pd is the same\n            if lr_dp:\n                if lr_dp \u003d\u003d router_dp:","commit_id":"67463d1407717b61c5d2a26d7e7c04ab118de4cc"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aba82458de822d67405cad5bbc256f7017499341","unresolved":true,"context_lines":[{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            if lr_dp:"},{"line_number":778,"context_line":"                lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":779,"context_line":"                lbs[lb.name] \u003d lb_ip"},{"line_number":780,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ab71089_c9143091","line":777,"range":{"start_line":777,"start_character":0,"end_line":777,"end_character":21},"in_reply_to":"5a01283a_19376ee2","updated":"2024-02-02 10:26:36.000000000","message":"Ah good point!","commit_id":"67463d1407717b61c5d2a26d7e7c04ab118de4cc"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"eb8b9bca0e399d44bd83162ac3c308620962d0a5","unresolved":true,"context_lines":[{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            if lr_dp \u003d\u003d router_dp:"},{"line_number":778,"context_line":"                lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":779,"context_line":"                lbs[lb.name] \u003d lb_ip"},{"line_number":780,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"a46f01b0_68ae3018","line":777,"range":{"start_line":777,"start_character":12,"end_line":777,"end_character":34},"updated":"2024-02-02 10:34:03.000000000","message":"sorry, I did not explain myself properly... I think there should be 2 nested ifs\n\nFirst one, is to check if lr_dp exists, if it does not, then we need to go to the else at line 780.\nBut if it exists, then we need to check if it is the same as router_dp. If it is, then we do the lb_ip \u003d ip_info... But if it is not, there is no need to do the else at line 780","commit_id":"dece5738af53811a7ec7048d61c708cfa38aca47"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"190d09f082a02b952bf89c71308a4d690e583b04","unresolved":true,"context_lines":[{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            if lr_dp \u003d\u003d router_dp:"},{"line_number":778,"context_line":"                lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":779,"context_line":"                lbs[lb.name] \u003d lb_ip"},{"line_number":780,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"2f6f23c6_c3dbb2d1","line":777,"range":{"start_line":777,"start_character":12,"end_line":777,"end_character":34},"in_reply_to":"a46f01b0_68ae3018","updated":"2024-02-02 10:45:12.000000000","message":"Sorry, I may have misinterpreted ur comment before. I will update the code","commit_id":"dece5738af53811a7ec7048d61c708cfa38aca47"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"132d3dc27f19a8b2a9c742ce71096c7d35288e14","unresolved":true,"context_lines":[{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            if lr_dp and lr_dp \u003d\u003d router_dp:"},{"line_number":778,"context_line":"                lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":779,"context_line":"                lbs[lb.name] \u003d lb_ip"},{"line_number":780,"context_line":"            elif not lr_dp:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1d6faa84_e9713c5b","line":777,"range":{"start_line":777,"start_character":1,"end_line":777,"end_character":44},"updated":"2024-02-02 10:58:25.000000000","message":"nit: sorry I did not thought of this before... perhaps simpler by switching the blocks:\nif not lr_dp:\n....\nelif lr_dp \u003d\u003d router_dp:\n....","commit_id":"ae89854d4938febcf591a8b819d29a5b52922e13"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b560d3dd93bd38f24e32bd0ce9e57d5829ad00a4","unresolved":true,"context_lines":[{"line_number":774,"context_line":"            if not lb_dp:"},{"line_number":775,"context_line":"                lb_dp \u003d lb.datapaths"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"            if lr_dp and lr_dp \u003d\u003d router_dp:"},{"line_number":778,"context_line":"                lb_ip \u003d ip_info.split(\" \")[0].split(\"/\")[0]"},{"line_number":779,"context_line":"                lbs[lb.name] \u003d lb_ip"},{"line_number":780,"context_line":"            elif not lr_dp:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffc6d9ac_720a5d3c","line":777,"range":{"start_line":777,"start_character":1,"end_line":777,"end_character":44},"in_reply_to":"1d6faa84_e9713c5b","updated":"2024-02-02 11:39:01.000000000","message":"Haha I agree, that way we don\u0027t need to test if lr_dp exists twice. Iwill change it","commit_id":"ae89854d4938febcf591a8b819d29a5b52922e13"}],"ovn_bgp_agent/drivers/openstack/watchers/bgp_watcher.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"746cc18b902a9f07dfaf3136b48992ae158b3133","unresolved":true,"context_lines":[{"line_number":401,"context_line":"        except AttributeError:"},{"line_number":402,"context_line":"            row_dp \u003d []"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        row_dp \u003d helpers.get_lb_datapath_group(row)"},{"line_number":405,"context_line":"        if not row_dp:"},{"line_number":406,"context_line":"            # No need to continue. There is no need to expose it as there is"},{"line_number":407,"context_line":"            # no datapaths (aka members)."}],"source_content_type":"text/x-python","patch_set":1,"id":"04e0fe91_c31d2959","line":404,"updated":"2023-12-20 15:17:03.000000000","message":"if this also returns the router_dp, then we can probably redo the logic from L418 to 443 to be simpler","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aba82458de822d67405cad5bbc256f7017499341","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        except AttributeError:"},{"line_number":402,"context_line":"            row_dp \u003d []"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        row_dp \u003d helpers.get_lb_datapath_group(row)"},{"line_number":405,"context_line":"        if not row_dp:"},{"line_number":406,"context_line":"            # No need to continue. There is no need to expose it as there is"},{"line_number":407,"context_line":"            # no datapaths (aka members)."}],"source_content_type":"text/x-python","patch_set":1,"id":"712e3a94_2b3a85d3","line":404,"in_reply_to":"04e0fe91_c31d2959","updated":"2024-02-02 10:26:36.000000000","message":"Done","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"}],"ovn_bgp_agent/utils/helpers.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"746cc18b902a9f07dfaf3136b48992ae158b3133","unresolved":true,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def get_lb_datapath_group(lb):"},{"line_number":31,"context_line":"    for attr in (\u0027ls_datapath_group\u0027, \u0027lr_datapath_group\u0027, \u0027datapath_group\u0027):"},{"line_number":32,"context_line":"        try:"},{"line_number":33,"context_line":"            dp \u003d getattr(lb, attr)[0].datapaths"},{"line_number":34,"context_line":"            if dp:"}],"source_content_type":"text/x-python","patch_set":1,"id":"e0ed5941_14100522","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":77},"updated":"2023-12-20 15:17:03.000000000","message":"perhaps we need to differentiate between ls_datapath_groupd/datapath_group and lr_datapath_group","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"aba82458de822d67405cad5bbc256f7017499341","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def get_lb_datapath_group(lb):"},{"line_number":31,"context_line":"    for attr in (\u0027ls_datapath_group\u0027, \u0027lr_datapath_group\u0027, \u0027datapath_group\u0027):"},{"line_number":32,"context_line":"        try:"},{"line_number":33,"context_line":"            dp \u003d getattr(lb, attr)[0].datapaths"},{"line_number":34,"context_line":"            if dp:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5562bfc7_911dee91","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":77},"in_reply_to":"e0ed5941_14100522","updated":"2024-02-02 10:26:36.000000000","message":"Done","commit_id":"063d38239090f810011ce427245b1235bb2bebf1"}]}
