)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e02ce6611efa5fae64437ea31dc63446875d09e1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a3c5fe63_45b6d568","updated":"2021-11-12 08:40:24.000000000","message":"Looks good for me but please reply to Rodolfo\u0027s question and I\u0027ll let him to approve it 😊","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"},{"author":{"_account_id":33652,"name":"Przemyslaw Szczerbik","email":"przemyslaw.szczerbik@gmail.com","username":"pszczerbik"},"change_message_id":"45eecd84d3f7a6837cdf069e496cabb9e81509ea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"97258cd1_743fcd10","updated":"2021-10-12 14:34:16.000000000","message":"This patch can be merged only after https://review.opendev.org/c/openstack/neutron/+/805637 is merged","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"},{"author":{"_account_id":33652,"name":"Przemyslaw Szczerbik","email":"przemyslaw.szczerbik@gmail.com","username":"pszczerbik"},"change_message_id":"f387f3479bded1094d9b12f918c0d4ab9ce7f79f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"19ec39ca_287319c0","updated":"2021-11-02 07:13:04.000000000","message":"recheck","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"e23c8216f3c35b76357c95aba08329b650aca24b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2e48a8e2_428f29a8","updated":"2021-11-19 14:20:46.000000000","message":"As I see all questions were discussed :)","commit_id":"d2bd7760efdef2c47ae67923aec37f914f8400ce"}],"neutron_lib/placement/client.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"c0b1fdb3725d26350b87b3347085f02dd1602e1c","unresolved":true,"context_lines":[{"line_number":771,"context_line":"                    raise n_exc.PlacementAllocationRpNotExists("},{"line_number":772,"context_line":"                        resource_provider\u003drp_uuid, consumer\u003dconsumer_uuid)"},{"line_number":773,"context_line":"                for drctn, value in diff.items():"},{"line_number":774,"context_line":"                    orig_value \u003d (body[\u0027allocations\u0027][rp_uuid]["},{"line_number":775,"context_line":"                        \u0027resources\u0027].get(drctn, 0))"},{"line_number":776,"context_line":"                    new_value \u003d orig_value + value"},{"line_number":777,"context_line":"                    if new_value \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"43dbeb8c_c4f01b11","line":774,"range":{"start_line":774,"start_character":33,"end_line":774,"end_character":34},"updated":"2021-11-11 16:16:08.000000000","message":"nitty nit: I think we don\u0027t need parentheses here","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"},{"author":{"_account_id":33652,"name":"Przemyslaw Szczerbik","email":"przemyslaw.szczerbik@gmail.com","username":"pszczerbik"},"change_message_id":"c64b8186acb2f3e1c49f7e447f3d586c1d2c0d03","unresolved":false,"context_lines":[{"line_number":771,"context_line":"                    raise n_exc.PlacementAllocationRpNotExists("},{"line_number":772,"context_line":"                        resource_provider\u003drp_uuid, consumer\u003dconsumer_uuid)"},{"line_number":773,"context_line":"                for drctn, value in diff.items():"},{"line_number":774,"context_line":"                    orig_value \u003d (body[\u0027allocations\u0027][rp_uuid]["},{"line_number":775,"context_line":"                        \u0027resources\u0027].get(drctn, 0))"},{"line_number":776,"context_line":"                    new_value \u003d orig_value + value"},{"line_number":777,"context_line":"                    if new_value \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"a7b7981b_9ecdcea8","line":774,"range":{"start_line":774,"start_character":33,"end_line":774,"end_character":34},"in_reply_to":"43dbeb8c_c4f01b11","updated":"2021-11-15 09:09:12.000000000","message":"Done","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"c0b1fdb3725d26350b87b3347085f02dd1602e1c","unresolved":true,"context_lines":[{"line_number":782,"context_line":"                        resources \u003d body[\u0027allocations\u0027][rp_uuid][\u0027resources\u0027]"},{"line_number":783,"context_line":"                        resources.pop(drctn, None)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"            # Remove RPs without any resources"},{"line_number":786,"context_line":"            body[\u0027allocations\u0027] \u003d {"},{"line_number":787,"context_line":"                rp: alloc for rp, alloc in body[\u0027allocations\u0027].items()"},{"line_number":788,"context_line":"                if alloc.get(\u0027resources\u0027)}"}],"source_content_type":"text/x-python","patch_set":1,"id":"b245660c_74cd9560","line":785,"range":{"start_line":785,"start_character":12,"end_line":785,"end_character":46},"updated":"2021-11-11 16:16:08.000000000","message":"Just a question, maybe I\u0027m wrong: body[\u0027allocations\u0027] comes from \"list_allocations\". It should have all resources populated. This operation won\u0027t remove anything.\n\nInstead of this, should we check body[\u0027allocations\u0027] resources with \"alloc_diff\"?","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"},{"author":{"_account_id":33652,"name":"Przemyslaw Szczerbik","email":"przemyslaw.szczerbik@gmail.com","username":"pszczerbik"},"change_message_id":"c64b8186acb2f3e1c49f7e447f3d586c1d2c0d03","unresolved":true,"context_lines":[{"line_number":782,"context_line":"                        resources \u003d body[\u0027allocations\u0027][rp_uuid][\u0027resources\u0027]"},{"line_number":783,"context_line":"                        resources.pop(drctn, None)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"            # Remove RPs without any resources"},{"line_number":786,"context_line":"            body[\u0027allocations\u0027] \u003d {"},{"line_number":787,"context_line":"                rp: alloc for rp, alloc in body[\u0027allocations\u0027].items()"},{"line_number":788,"context_line":"                if alloc.get(\u0027resources\u0027)}"}],"source_content_type":"text/x-python","patch_set":1,"id":"da91d83e_2e815a9a","line":785,"range":{"start_line":785,"start_character":12,"end_line":785,"end_character":46},"in_reply_to":"b245660c_74cd9560","updated":"2021-11-15 09:09:12.000000000","message":"It\u0027s about L783. When we\u0027re iterating over alloc_diff.items() and new_value is \u003c\u003d 0, then that direction is popped from resources variable. At this point, we do not remove RP from body, because remaining items might be using this RP. So \u0027resources\u0027 dict can be empty.\n\nL786 removes RPs with empty \u0027resources\u0027 dict.\n\nExample PDB output [1]. In this case QoS(min_bw_egress, min_bw_ingress) was changed to None.\n\n[1] https://paste.openstack.org/show/810994/","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"255ccd1be476878829783d343490ed4cd126b05e","unresolved":false,"context_lines":[{"line_number":782,"context_line":"                        resources \u003d body[\u0027allocations\u0027][rp_uuid][\u0027resources\u0027]"},{"line_number":783,"context_line":"                        resources.pop(drctn, None)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"            # Remove RPs without any resources"},{"line_number":786,"context_line":"            body[\u0027allocations\u0027] \u003d {"},{"line_number":787,"context_line":"                rp: alloc for rp, alloc in body[\u0027allocations\u0027].items()"},{"line_number":788,"context_line":"                if alloc.get(\u0027resources\u0027)}"}],"source_content_type":"text/x-python","patch_set":1,"id":"913f8117_b107dde6","line":785,"range":{"start_line":785,"start_character":12,"end_line":785,"end_character":46},"in_reply_to":"da91d83e_2e815a9a","updated":"2021-11-19 11:58:17.000000000","message":"Ok, now I see. Thanks for the pasted example.","commit_id":"47a08e36bf864806ca71ea77ffcf6602d4e5db04"}]}
