)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"07f040e41e70c15866741cbc27cf9d7e477517d5","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement pagination in admin/proj network tab"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactored network_list_for_tenant code to be able"},{"line_number":10,"context_line":"to paginate it accordingly merging the 3 distinct"},{"line_number":11,"context_line":"queries."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partial-Bug: #1746184"},{"line_number":14,"context_line":"Change-Id: I96a2d6cabed47c89bdc02ec922d7f9451e5ec025"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9f7ffda1_c1ea6195","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":8},"updated":"2022-02-16 13:43:55.000000000","message":"Commit msg can be improved.","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"8c9cf23d003c35ada5efed7ae60691067faa9ec1","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement pagination in admin/proj network tab"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactored network_list_for_tenant code to be able"},{"line_number":10,"context_line":"to paginate it accordingly merging the 3 distinct"},{"line_number":11,"context_line":"queries."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partial-Bug: #1746184"},{"line_number":14,"context_line":"Change-Id: I96a2d6cabed47c89bdc02ec922d7f9451e5ec025"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"a2993b54_6a74e527","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":8},"in_reply_to":"9f7ffda1_c1ea6195","updated":"2022-02-16 21:21:19.000000000","message":"done","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"293672ea34cd0cf623519116f2c724a769cd4311","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodrigo Barbieri \u003crodrigo.barbieri2010@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2022-02-16 18:15:48 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement pagination in admin/proj network tab"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added pagination support to the networks page under"},{"line_number":10,"context_line":"Project and Admin Dashboard."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"6a6f7630_c10c7255","line":7,"range":{"start_line":7,"start_character":43,"end_line":7,"end_character":46},"updated":"2022-02-18 11:26:39.000000000","message":"maybe panel could be the right word here.","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"ca92e24a613890ccd0aeacf741537b6b701565f1","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"beaca0af_5186ecde","updated":"2021-12-06 12:19:24.000000000","message":"Hi, Tested your patch last week in my env, it doesn\u0027t handle few case of delete a network.\nFor example, If I delete all networks from last page then it should redirect\nto either prev. page or first page. Could you handle that case.\nOtherwise Works fine like add Pagination for network table under project/admin panel.\n\nAbout the Code I will review in more detail once you rebase it on master and add/fix\nUnit test for the Change. Also, link the bug 1746184 with this patch.","commit_id":"1bed389742b5d0bb25e04d8fae48a291a0ce0b62"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"61f118f3035ec240be3086a16e3280531ad411ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"01e7306d_a20ca729","updated":"2021-12-09 21:37:31.000000000","message":"Thanks for the review Vishal, I fixed the delete scenarios (last page and first page). Now I am going to work on unit tests.","commit_id":"20ac0646f9e94093ec8c6f6559eed7e9637eb365"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"66dcedc24a914d258167e5060478598ca7063d10","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ad214e14_b6a5d0c9","updated":"2021-12-15 17:12:46.000000000","message":"investigating failures: https://paste.opendev.org/show/811691/","commit_id":"0da7fffefc06c80d9ea19be64ee30442738f25b1"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"0907433360a117fd3115706aae801d04f5d1fda3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e0c0c513_d75cc83a","in_reply_to":"ad214e14_b6a5d0c9","updated":"2021-12-15 18:05:45.000000000","message":"fixed it","commit_id":"0da7fffefc06c80d9ea19be64ee30442738f25b1"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"2086d4620b3a44af405fa3cd0ec581c74fadb14e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"297b03f9_8d547952","updated":"2022-01-06 14:37:45.000000000","message":"recheck","commit_id":"ca2b0a339e30590df6fc0db567654b06490fecff"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"b85c692f_192ecbef","updated":"2022-02-07 11:58:49.000000000","message":"Thanks for the patch, Please find some comments inline.\n\nPlease add the release note for this bp.\n\nI still see some issues with the Delete operations:\ntry the below steps:\n1. Go to Setting-\u003eItem per page(3)\n2. Project-\u003e Network, Let\u0027s consider I have a total of 5 n/w\u0027s.\n3. Delete 2 n/w\u0027s on page1 and after that, you can only see 1 n/w on page1 which is wrong.\n\n\nAnother Scenario:\n1. Consider Item per page is 3.\n2. Consider Total Number of Networks is 4(i.e 3 n/w\u0027s on Page 1 and 1 n/w on Page 2).\n3. Go to Page no. 2 and delete n/w and now it will redirect you to Page1 that only show 2 n/w.\n4. but it needs to show 3 n/w\u0027s.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"0a5f629d03f3051628596ed77a6a1925e786fb91","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"d8321731_9748fa5b","updated":"2022-02-08 16:44:29.000000000","message":"adding review priority for this patch to get more attention.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"6f7a11f82afc45a91c0a122949044bd8cd3c5cae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"b8bf44af_db66b26c","updated":"2022-01-12 16:31:34.000000000","message":"failues in that CI result ^ were unrelated to the patch (random CI failures)","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"92c52bf93c666d55469bc9c786f0a83e17dfd107","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"0c8ca470_4c5468a0","updated":"2022-01-12 16:31:40.000000000","message":"recheck","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"fa954e74_e011f63b","in_reply_to":"b85c692f_192ecbef","updated":"2022-02-09 13:57:40.000000000","message":"Thanks for raising those corner cases! Indeed they required logic adjustments to be addressed.\n\nAlso, it is currently only logged as bug, not a bp. Are you saying this is both a bug and a bp?","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"cc5610e0_a739309f","updated":"2022-02-09 13:57:40.000000000","message":"Thanks Vishal for the review. I responded to all your comments while addressing most of them (some others warrant a discussion I think). Please take a look at the new patchset when you have some time.\n\nAlso please notice that the patch [1] removed a bunch of unit tests from [2], and now I have no failing unit tests anymore from that test class. This is strange, I have not looked in detail (focused mostly on other issues to push a new patch asap) but it feels like a bunch of stuff is possibly not being tested anymore, as my previous patch made adjustments to those unit tests that are not gone and nothing is in need of adjustment now.\n\n[1] https://github.com/openstack/horizon/commit/6ac31e0ba8df520133d20d21e35085d9b882c04e\n[2] openstack_dashboard/dashboards/project/instances/tests.py","commit_id":"b9a5b898da5829cda3dc2d458c337f08731b724c"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"07f040e41e70c15866741cbc27cf9d7e477517d5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"6c3ea59e_7a664ad1","updated":"2022-02-16 13:43:55.000000000","message":"LGTM, will +2 once you fix the case I mentioned in P.S. 8 for admin dashboard.\n\n1. Go to Setting-\u003eItem per page(3)\n2. Admin-\u003e Network, Let\u0027s consider I have a total of 5 n/w\u0027s.\n3. Delete 2 on page1 and after that, you will see an error\n   \"Network list can not be retrieved\".","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"6fb0801ee0e750f9190cb28f5ee361f174b5bb33","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"20336f6c_02498915","updated":"2022-02-09 17:38:52.000000000","message":"recheck","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"18f4424f109cce58776979fe2c498b6e2e48c2db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"5f662397_302a7985","updated":"2022-02-09 21:41:46.000000000","message":"recheck","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"259112a8bc0f370804e03c7e86b8068e46420f92","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"c690e15d_7acc7f4c","updated":"2022-02-09 14:25:41.000000000","message":"small pep8 issue fixed between patchsets 9 and 10","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"8c9cf23d003c35ada5efed7ae60691067faa9ec1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"b9844ac3_571b1c9f","in_reply_to":"6c3ea59e_7a664ad1","updated":"2022-02-16 21:21:19.000000000","message":"fixed. I have also included unit tests specific for this method now, although now that I have submitted the patch I just realized I could have done opaque unit tests for this setting the request.session property to simulate the deletion. I am wondering if it is worth to rework those new unit tests.","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"9bf525bfef4a2cd0b707fb69bc74a11f105eaf96","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"c802be77_990a09e5","in_reply_to":"b9844ac3_571b1c9f","updated":"2022-02-16 21:55:45.000000000","message":"after thinking this further I believe that due to the complexity of that method it is best to have see-through unit tests for it as it is currently implemented in the latest patch","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"884125da7e83ef01c80deb3def9693935bcd16f4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"f83ff522_02da06e4","updated":"2022-02-21 15:44:08.000000000","message":"Akihiro, I tried testing [1] but saw no change. I am confused.\n\n[1] https://review.opendev.org/c/openstack/horizon/+/829843 ","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"63aa4f99c86f03ce6c3edb9a84b612087ac0151c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"8529a6a9_e0934d44","updated":"2022-02-21 14:00:08.000000000","message":"Hi Akihiro, thanks for the review. I will try to address your main concerns:\n\n1) yes, the conditional return value type change is bad, but it can be fixed once all callers are updated to be pagination-aware. This condition return value type was never meant to be definitive or maintained long term. If it was done as part of this patch it would be a much bigger patch and harder to review, especially while other sections of the code around those callers were undergoing changes. On the other hand, removing the condition and standardizing the return value can be easily done where the condition is implemented once it is no longer needed.\n\n2) Another reason why it would have to be temporarily implemented like this is because some of the callers wouldn\u0027t easily support pagination until adjusted to do so. One example of this is that apparently (I haven\u0027t checked it myself yet) patch [1] by Tatiana as you mentioned now adds support for pagination there, so now it is impossible for that caller to be pagination-aware.\n\nhttps://review.opendev.org/c/openstack/horizon/+/829843","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"c6e993b2d19015efc73065b8082cf4c1fdc7834d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"8dff876c_ce05ec61","updated":"2022-02-21 02:11:53.000000000","message":"I see several important regressions after merging this commit.\nThey happens as the return value of network_list_for_tenant was changed but the change was not applied  to all callers of network_list_for_tenant [1][2][3][4].\nOnly the call of network_list_for_tenant in openstack_dashboard/dashboards/project/networks/views.py was covered by this commit.\nWhile this commit itself was merged, could you take care of them too?\n\nIn addition, Tatiana proposed a support for network pagination in the launch instance form in [5].\nThis commit and [5] conflict each other. The solution needs to be coordinated. Please discuss a solution with Tatiana.\n\n[1] https://github.com/openstack/horizon/blob/5e385fab25e3c50f5b756d31599c866be64fbfca/openstack_dashboard/api/rest/neutron.py#L46-L49\n[2] https://github.com/openstack/horizon/blob/5e385fab25e3c50f5b756d31599c866be64fbfca/openstack_dashboard/dashboards/project/instances/utils.py#L102-L103\n[3] https://github.com/openstack/horizon/blob/5e385fab25e3c50f5b756d31599c866be64fbfca/openstack_dashboard/dashboards/project/network_topology/views.py#L265-L268\n[4] https://github.com/openstack/horizon/blob/5e385fab25e3c50f5b756d31599c866be64fbfca/openstack_dashboard/dashboards/project/routers/ports/forms.py#L50\n[5] https://review.opendev.org/c/openstack/horizon/+/829843\n\n","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"293672ea34cd0cf623519116f2c724a769cd4311","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"31f6c482_c1ebe454","updated":"2022-02-18 11:26:39.000000000","message":"LGTM, I have tested in my devstack env.\n","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"f874bf932afc9333512c32b7d35bac261f64c8ba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"cdd81569_3c3d0a3f","updated":"2022-02-17 06:20:16.000000000","message":"recheck","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"08b9cb7d823322848526860ee768bdf7740d65d5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":11,"id":"0561bf44_4c704347","in_reply_to":"8529a6a9_e0934d44","updated":"2022-02-21 14:06:20.000000000","message":"\u003e Hi Akihiro, thanks for the review. I will try to address your main concerns:\n\u003e \nadds support for pagination there, so now it is impossible for that caller to be pagination-aware.\n\u003e \n\nEDIT:  so now it is **possible** for that caller to be pagination-aware","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"db19d75d98e11f353e34cea39ec84a6231e3c4ea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"1ff02f13_4d03decd","in_reply_to":"8dff876c_ce05ec61","updated":"2022-02-21 05:05:32.000000000","message":"Sorry for misunderstanding. The code itself works for all cases. When I changed the code, it was easily broken, so I misunderstood as above. I did not notice the function changes the types of the return value consditionally.\n(it was my bad as I did not review it well)\n\nOn the other hand, the new version of network_list_for_tenant is super tricky from the maintenance perspecitve. It changes the types of the return value depending on the condition. It is highly discouraged from the maintenance perspective. If a function needs to change the types of the return value conditionally, it is a big signal that you should have two separate functions each of which returns a consistent type.","commit_id":"196de449b6f7be3707cfd08fd1099c4ed792fba0"}],"openstack_dashboard/api/neutron.py":[{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":"@profiler.trace"},{"line_number":1013,"context_line":"def network_list_paged(request, page_data, **params):"},{"line_number":1014,"context_line":"    page_data, marker_net \u003d _configure_pagination(request, params, page_data)"},{"line_number":1015,"context_line":"    query_kwargs \u003d {"},{"line_number":1016,"context_line":"        \u0027request\u0027: request,"},{"line_number":1017,"context_line":"        \u0027page_data\u0027: page_data,"}],"source_content_type":"text/x-python","patch_set":8,"id":"f367347d_7dcbffd9","line":1014,"range":{"start_line":1014,"start_character":3,"end_line":1014,"end_character":13},"updated":"2022-02-07 11:58:49.000000000","message":"no need for it. see my comment at line 1302.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":"@profiler.trace"},{"line_number":1013,"context_line":"def network_list_paged(request, page_data, **params):"},{"line_number":1014,"context_line":"    page_data, marker_net \u003d _configure_pagination(request, params, page_data)"},{"line_number":1015,"context_line":"    query_kwargs \u003d {"},{"line_number":1016,"context_line":"        \u0027request\u0027: request,"},{"line_number":1017,"context_line":"        \u0027page_data\u0027: page_data,"}],"source_content_type":"text/x-python","patch_set":8,"id":"e524b828_54f55bd8","line":1014,"range":{"start_line":1014,"start_character":3,"end_line":1014,"end_character":13},"in_reply_to":"f367347d_7dcbffd9","updated":"2022-02-09 13:57:40.000000000","message":"see response at 1302. The alternative would be to add a condition to every outside function:\n\nif page_data is None:\n    page_data \u003d {}\n\nand then remove the returned object. The condition is then needed because page_data is provided by the webpage and there is no guarantee if it is None or not. For example, the instance\u0027s page would not provide page_data when invoking network_list_for_tenant.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1075,"context_line":""},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"@profiler.trace"},{"line_number":1078,"context_line":"def update_pagination(entities, page_data):"},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":"    has_more_data, has_prev_data \u003d False, False"},{"line_number":1081,"context_line":""},{"line_number":1082,"context_line":"    # single_page\u003dTrue is actually to have pagination enabled"},{"line_number":1083,"context_line":"    if page_data.get(\u0027single_page\u0027) is not True:"},{"line_number":1084,"context_line":"        return entities, has_more_data, has_prev_data"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"    if len(entities) \u003e page_data[\u0027page_size\u0027]:"},{"line_number":1087,"context_line":"        has_more_data \u003d True"},{"line_number":1088,"context_line":"        entities.pop()"},{"line_number":1089,"context_line":"        if page_data.get(\u0027marker_id\u0027) is not None:"},{"line_number":1090,"context_line":"            has_prev_data \u003d True"},{"line_number":1091,"context_line":""},{"line_number":1092,"context_line":"    # first page condition when reached via prev back"},{"line_number":1093,"context_line":"    elif (page_data.get(\u0027sort_dir\u0027) \u003d\u003d \u0027desc\u0027 and"},{"line_number":1094,"context_line":"          page_data.get(\u0027marker_id\u0027) is not None):"},{"line_number":1095,"context_line":"        has_more_data \u003d True"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"    # last page condition"},{"line_number":1098,"context_line":"    elif page_data.get(\u0027marker_id\u0027) is not None:"},{"line_number":1099,"context_line":"        has_prev_data \u003d True"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"    if page_data.get(\u0027sort_dir\u0027) \u003d\u003d \u0027desc\u0027:"},{"line_number":1102,"context_line":"        entities.reverse()"},{"line_number":1103,"context_line":""},{"line_number":1104,"context_line":"    return entities, has_more_data, has_prev_data"},{"line_number":1105,"context_line":""},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"def _add_to_nets_and_return("}],"source_content_type":"text/x-python","patch_set":8,"id":"f5a0952a_a59c3559","line":1104,"range":{"start_line":1078,"start_character":0,"end_line":1104,"end_character":49},"updated":"2022-02-07 11:58:49.000000000","message":"update_pagination function is used by nova and cinder as well.\nIMO we can write this function in api/base.py and inherit it in other file rather\nthan duplicating the same code at multiple places but we can do that as an improvement in a separate patch.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"07f040e41e70c15866741cbc27cf9d7e477517d5","unresolved":false,"context_lines":[{"line_number":1075,"context_line":""},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"@profiler.trace"},{"line_number":1078,"context_line":"def update_pagination(entities, page_data):"},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":"    has_more_data, has_prev_data \u003d False, False"},{"line_number":1081,"context_line":""},{"line_number":1082,"context_line":"    # single_page\u003dTrue is actually to have pagination enabled"},{"line_number":1083,"context_line":"    if page_data.get(\u0027single_page\u0027) is not True:"},{"line_number":1084,"context_line":"        return entities, has_more_data, has_prev_data"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"    if len(entities) \u003e page_data[\u0027page_size\u0027]:"},{"line_number":1087,"context_line":"        has_more_data \u003d True"},{"line_number":1088,"context_line":"        entities.pop()"},{"line_number":1089,"context_line":"        if page_data.get(\u0027marker_id\u0027) is not None:"},{"line_number":1090,"context_line":"            has_prev_data \u003d True"},{"line_number":1091,"context_line":""},{"line_number":1092,"context_line":"    # first page condition when reached via prev back"},{"line_number":1093,"context_line":"    elif (page_data.get(\u0027sort_dir\u0027) \u003d\u003d \u0027desc\u0027 and"},{"line_number":1094,"context_line":"          page_data.get(\u0027marker_id\u0027) is not None):"},{"line_number":1095,"context_line":"        has_more_data \u003d True"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"    # last page condition"},{"line_number":1098,"context_line":"    elif page_data.get(\u0027marker_id\u0027) is not None:"},{"line_number":1099,"context_line":"        has_prev_data \u003d True"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"    if page_data.get(\u0027sort_dir\u0027) \u003d\u003d \u0027desc\u0027:"},{"line_number":1102,"context_line":"        entities.reverse()"},{"line_number":1103,"context_line":""},{"line_number":1104,"context_line":"    return entities, has_more_data, has_prev_data"},{"line_number":1105,"context_line":""},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"def _add_to_nets_and_return("}],"source_content_type":"text/x-python","patch_set":8,"id":"a57af4fc_daa732ab","line":1104,"range":{"start_line":1078,"start_character":0,"end_line":1104,"end_character":49},"in_reply_to":"b0d562a5_a08f7c98","updated":"2022-02-16 13:43:55.000000000","message":"Ack","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1075,"context_line":""},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"@profiler.trace"},{"line_number":1078,"context_line":"def update_pagination(entities, page_data):"},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":"    has_more_data, has_prev_data \u003d False, False"},{"line_number":1081,"context_line":""},{"line_number":1082,"context_line":"    # single_page\u003dTrue is actually to have pagination enabled"},{"line_number":1083,"context_line":"    if page_data.get(\u0027single_page\u0027) is not True:"},{"line_number":1084,"context_line":"        return entities, has_more_data, has_prev_data"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"    if len(entities) \u003e page_data[\u0027page_size\u0027]:"},{"line_number":1087,"context_line":"        has_more_data \u003d True"},{"line_number":1088,"context_line":"        entities.pop()"},{"line_number":1089,"context_line":"        if page_data.get(\u0027marker_id\u0027) is not None:"},{"line_number":1090,"context_line":"            has_prev_data \u003d True"},{"line_number":1091,"context_line":""},{"line_number":1092,"context_line":"    # first page condition when reached via prev back"},{"line_number":1093,"context_line":"    elif (page_data.get(\u0027sort_dir\u0027) \u003d\u003d \u0027desc\u0027 and"},{"line_number":1094,"context_line":"          page_data.get(\u0027marker_id\u0027) is not None):"},{"line_number":1095,"context_line":"        has_more_data \u003d True"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"    # last page condition"},{"line_number":1098,"context_line":"    elif page_data.get(\u0027marker_id\u0027) is not None:"},{"line_number":1099,"context_line":"        has_prev_data \u003d True"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"    if page_data.get(\u0027sort_dir\u0027) \u003d\u003d \u0027desc\u0027:"},{"line_number":1102,"context_line":"        entities.reverse()"},{"line_number":1103,"context_line":""},{"line_number":1104,"context_line":"    return entities, has_more_data, has_prev_data"},{"line_number":1105,"context_line":""},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"def _add_to_nets_and_return("}],"source_content_type":"text/x-python","patch_set":8,"id":"b0d562a5_a08f7c98","line":1104,"range":{"start_line":1078,"start_character":0,"end_line":1104,"end_character":49},"in_reply_to":"f5a0952a_a59c3559","updated":"2022-02-09 13:57:40.000000000","message":"yea I tried consolidating it but once I realize the ordering is inverted in neutron I decided it would be better to have that done in a separate patch to avoid touching far too many places in a single huge complex patch like this one. I added a TODO here.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1290,"context_line":"        page_data[\u0027limit\u0027] \u003d page_data[\u0027page_size\u0027] + 1"},{"line_number":1291,"context_line":"        params[\u0027limit\u0027] \u003d page_data[\u0027limit\u0027]"},{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"        # Neutron API sort direction is inverted compared to other services"},{"line_number":1294,"context_line":"        page_data[\u0027sort_dir\u0027] \u003d page_data.get(\u0027sort_dir\u0027, \"desc\")"},{"line_number":1295,"context_line":"        if page_data[\u0027sort_dir\u0027] \u003d\u003d \u0027asc\u0027:"},{"line_number":1296,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027desc\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"5346b890_66fba1b7","line":1293,"range":{"start_line":1293,"start_character":8,"end_line":1293,"end_character":75},"updated":"2022-02-07 11:58:49.000000000","message":"why is done in this way in neutron, any specific reason for that.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1290,"context_line":"        page_data[\u0027limit\u0027] \u003d page_data[\u0027page_size\u0027] + 1"},{"line_number":1291,"context_line":"        params[\u0027limit\u0027] \u003d page_data[\u0027limit\u0027]"},{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"        # Neutron API sort direction is inverted compared to other services"},{"line_number":1294,"context_line":"        page_data[\u0027sort_dir\u0027] \u003d page_data.get(\u0027sort_dir\u0027, \"desc\")"},{"line_number":1295,"context_line":"        if page_data[\u0027sort_dir\u0027] \u003d\u003d \u0027asc\u0027:"},{"line_number":1296,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027desc\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff5c61c9_8c525bfa","line":1293,"range":{"start_line":1293,"start_character":8,"end_line":1293,"end_character":75},"in_reply_to":"5346b890_66fba1b7","updated":"2022-02-09 13:57:40.000000000","message":"no idea :\\\n\nThis can be tested talking to the API directly using curl... the result is reversed when compared to nova\u0027s and cinder\u0027s.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"07f040e41e70c15866741cbc27cf9d7e477517d5","unresolved":false,"context_lines":[{"line_number":1290,"context_line":"        page_data[\u0027limit\u0027] \u003d page_data[\u0027page_size\u0027] + 1"},{"line_number":1291,"context_line":"        params[\u0027limit\u0027] \u003d page_data[\u0027limit\u0027]"},{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"        # Neutron API sort direction is inverted compared to other services"},{"line_number":1294,"context_line":"        page_data[\u0027sort_dir\u0027] \u003d page_data.get(\u0027sort_dir\u0027, \"desc\")"},{"line_number":1295,"context_line":"        if page_data[\u0027sort_dir\u0027] \u003d\u003d \u0027asc\u0027:"},{"line_number":1296,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027desc\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"129afd50_6a18505f","line":1293,"range":{"start_line":1293,"start_character":8,"end_line":1293,"end_character":75},"in_reply_to":"ff5c61c9_8c525bfa","updated":"2022-02-16 13:43:55.000000000","message":"Ack","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"        # Neutron API sort direction is inverted compared to other services"},{"line_number":1294,"context_line":"        page_data[\u0027sort_dir\u0027] \u003d page_data.get(\u0027sort_dir\u0027, \"desc\")"},{"line_number":1295,"context_line":"        if page_data[\u0027sort_dir\u0027] \u003d\u003d \u0027asc\u0027:"},{"line_number":1296,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027desc\u0027"},{"line_number":1297,"context_line":"        else:"},{"line_number":1298,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1299,"context_line":"        params[\u0027sort_dir\u0027] \u003d page_data[\u0027sort_dir\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"19e7f9ac_707157be","line":1296,"range":{"start_line":1295,"start_character":8,"end_line":1296,"end_character":42},"updated":"2022-02-07 11:58:49.000000000","message":"A method like this would be helpful since I see this condition repeated several times.\n\n    def change_order(order\u003d\u0027asc\u0027):\n        if order \u003d\u003d \u0027asc\u0027\n            return \u0027desc\u0027\n        return \u0027asc\u0027\npage_data[\u0027sort_dir\u0027] \u003d change_order(page_data[\u0027sort_dir\u0027])","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"        # Neutron API sort direction is inverted compared to other services"},{"line_number":1294,"context_line":"        page_data[\u0027sort_dir\u0027] \u003d page_data.get(\u0027sort_dir\u0027, \"desc\")"},{"line_number":1295,"context_line":"        if page_data[\u0027sort_dir\u0027] \u003d\u003d \u0027asc\u0027:"},{"line_number":1296,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027desc\u0027"},{"line_number":1297,"context_line":"        else:"},{"line_number":1298,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1299,"context_line":"        params[\u0027sort_dir\u0027] \u003d page_data[\u0027sort_dir\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"65952abc_e30eac3f","line":1296,"range":{"start_line":1295,"start_character":8,"end_line":1296,"end_character":42},"in_reply_to":"19e7f9ac_707157be","updated":"2022-02-09 13:57:40.000000000","message":"done. I actually ended up doing that in only once place that I could find by doing a quick search.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1296,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027desc\u0027"},{"line_number":1297,"context_line":"        else:"},{"line_number":1298,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1299,"context_line":"        params[\u0027sort_dir\u0027] \u003d page_data[\u0027sort_dir\u0027]"},{"line_number":1300,"context_line":"        params[\u0027sort_key\u0027] \u003d \u0027id\u0027"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    return page_data, marker_net"},{"line_number":1303,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7448e58a_b366419d","line":1300,"range":{"start_line":1299,"start_character":8,"end_line":1300,"end_character":33},"updated":"2022-02-07 11:58:49.000000000","message":"why do we need to pass the same information twice to neutron in the form of page_data and params?","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1296,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027desc\u0027"},{"line_number":1297,"context_line":"        else:"},{"line_number":1298,"context_line":"            page_data[\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1299,"context_line":"        params[\u0027sort_dir\u0027] \u003d page_data[\u0027sort_dir\u0027]"},{"line_number":1300,"context_line":"        params[\u0027sort_key\u0027] \u003d \u0027id\u0027"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    return page_data, marker_net"},{"line_number":1303,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"537328cb_517ab727","line":1300,"range":{"start_line":1299,"start_character":8,"end_line":1300,"end_character":33},"in_reply_to":"7448e58a_b366419d","updated":"2022-02-09 13:57:40.000000000","message":"params will be included in the request to the neutron API. Page_data is a helper struct to assist the pagination code logic.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1299,"context_line":"        params[\u0027sort_dir\u0027] \u003d page_data[\u0027sort_dir\u0027]"},{"line_number":1300,"context_line":"        params[\u0027sort_key\u0027] \u003d \u0027id\u0027"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    return page_data, marker_net"},{"line_number":1303,"context_line":""},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"def _perform_query("}],"source_content_type":"text/x-python","patch_set":8,"id":"b8647de0_72a30a0f","line":1302,"range":{"start_line":1302,"start_character":11,"end_line":1302,"end_character":20},"updated":"2022-02-07 11:58:49.000000000","message":"In python, lists are passed by reference so we don\u0027t need to return this. Is it done because if someone doesn\u0027t pass page_data and we create the list from scratch here but I don\u0027t see _configure_pagination method being called without passing the page_data.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1299,"context_line":"        params[\u0027sort_dir\u0027] \u003d page_data[\u0027sort_dir\u0027]"},{"line_number":1300,"context_line":"        params[\u0027sort_key\u0027] \u003d \u0027id\u0027"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    return page_data, marker_net"},{"line_number":1303,"context_line":""},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"def _perform_query("}],"source_content_type":"text/x-python","patch_set":8,"id":"a9ea9671_e9baa6c3","line":1302,"range":{"start_line":1302,"start_character":11,"end_line":1302,"end_character":20},"in_reply_to":"b8647de0_72a30a0f","updated":"2022-02-09 13:57:40.000000000","message":"We actually do because of LN 1274. The alternative would be to always expect the object and have it be created outside of the function, even if passed empty, which would be slightly strange IMO. Your suggestion makes sense because you know the inside of _configure_pagination function and how it works, but from an outside caller it is more succint IMO to not have to care about what happens inside the function and just receive page_data filled in either case.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1327,"context_line":"                    query_kwargs[\u0027page_data\u0027][\u0027sort_dir\u0027] \u003d\u003d \u0027asc\u0027):"},{"line_number":1328,"context_line":"                # admin section params"},{"line_number":1329,"context_line":"                if \u0027params\u0027 in query_kwargs:"},{"line_number":1330,"context_line":"                    query_kwargs[\u0027params\u0027][\u0027sort_dir\u0027] \u003d \u0027desc\u0027"},{"line_number":1331,"context_line":"                else:"},{"line_number":1332,"context_line":"                    query_kwargs[\u0027page_data\u0027][\u0027marker_type\u0027] \u003d ("},{"line_number":1333,"context_line":"                        _configure_marker_type(marker_net,"}],"source_content_type":"text/x-python","patch_set":8,"id":"903c342a_44dd023c","line":1330,"range":{"start_line":1330,"start_character":20,"end_line":1330,"end_character":63},"updated":"2022-02-07 11:58:49.000000000","message":"aren\u0027t we already doing this in _configure_pagination method? Line 1299 is doing the same thing and is called before this method.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1327,"context_line":"                    query_kwargs[\u0027page_data\u0027][\u0027sort_dir\u0027] \u003d\u003d \u0027asc\u0027):"},{"line_number":1328,"context_line":"                # admin section params"},{"line_number":1329,"context_line":"                if \u0027params\u0027 in query_kwargs:"},{"line_number":1330,"context_line":"                    query_kwargs[\u0027params\u0027][\u0027sort_dir\u0027] \u003d \u0027desc\u0027"},{"line_number":1331,"context_line":"                else:"},{"line_number":1332,"context_line":"                    query_kwargs[\u0027page_data\u0027][\u0027marker_type\u0027] \u003d ("},{"line_number":1333,"context_line":"                        _configure_marker_type(marker_net,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1b464465_874c258a","line":1330,"range":{"start_line":1330,"start_character":20,"end_line":1330,"end_character":63},"in_reply_to":"903c342a_44dd023c","updated":"2022-02-09 13:57:40.000000000","message":"no this situation is very specific, see the \"if deleted:\" above. These are only special cases where a network is deleted in the first or last page. Certainly I could call \"reverse_order(sort_dir)\", but there is no way to simplify this logic to be generic and not have \"desc\" and \"asc\" cases  handled separatedly, so there is nothing to gain with the use of \"reverse_order(sort_dir)\" in this particular case (and the one right below).","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":1344,"context_line":"            # as if the section was loaded for the first time"},{"line_number":1345,"context_line":"            elif (has_more_data and not has_prev_data and"},{"line_number":1346,"context_line":"                    query_kwargs[\u0027page_data\u0027][\u0027sort_dir\u0027] \u003d\u003d \u0027desc\u0027):"},{"line_number":1347,"context_line":"                query_kwargs[\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1348,"context_line":"                query_kwargs[\u0027page_data\u0027][\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1349,"context_line":"                query_kwargs[\u0027page_data\u0027][\u0027marker_id\u0027] \u003d None"},{"line_number":1350,"context_line":"                query_kwargs[\u0027page_data\u0027][\u0027marker_type\u0027] \u003d None"},{"line_number":1351,"context_line":"                # admin section params"}],"source_content_type":"text/x-python","patch_set":8,"id":"77d6be35_e033369a","line":1348,"range":{"start_line":1347,"start_character":16,"end_line":1348,"end_character":61},"updated":"2022-02-07 11:58:49.000000000","message":"we are changing the order of sort_dir here but not in the above case at Line1330. Also what is the difference between query_kwargs[\u0027sort_dir\u0027], query_kwargs[\u0027page_data\u0027][\u0027sort_dir\u0027] and query_kwargs[\u0027params\u0027][\u0027sort_dir\u0027] because we\u0027re passing the same value in all 3 places, is it an issue with neutron requiring same value at different places or the functionality of these are different? Please explain?","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":1344,"context_line":"            # as if the section was loaded for the first time"},{"line_number":1345,"context_line":"            elif (has_more_data and not has_prev_data and"},{"line_number":1346,"context_line":"                    query_kwargs[\u0027page_data\u0027][\u0027sort_dir\u0027] \u003d\u003d \u0027desc\u0027):"},{"line_number":1347,"context_line":"                query_kwargs[\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1348,"context_line":"                query_kwargs[\u0027page_data\u0027][\u0027sort_dir\u0027] \u003d \u0027asc\u0027"},{"line_number":1349,"context_line":"                query_kwargs[\u0027page_data\u0027][\u0027marker_id\u0027] \u003d None"},{"line_number":1350,"context_line":"                query_kwargs[\u0027page_data\u0027][\u0027marker_type\u0027] \u003d None"},{"line_number":1351,"context_line":"                # admin section params"}],"source_content_type":"text/x-python","patch_set":8,"id":"41df77d1_6dcd309b","line":1348,"range":{"start_line":1347,"start_character":16,"end_line":1348,"end_character":61},"in_reply_to":"77d6be35_e033369a","updated":"2022-02-09 13:57:40.000000000","message":"yes we are changing the sort_dir in line 1330, see lines 1326 and 1336.\n\nThe logic in the admin page is handled slightly differently than the project page. So in the admin page it is simpler with just one query so we use query_kwargs[\u0027params\u0027] to include the params in the request directly. In the project page, we update the page_data so the logic coded for the project requests are handled accordingly between the multiple requests.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"}],"openstack_dashboard/test/integration_tests/tests/test_networks.py":[{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"b5234b77ac62c2428b1910a1db173e0ce7020aec","unresolved":true,"context_lines":[{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        networks_page \u003d self.networks_page"},{"line_number":77,"context_line":"        count \u003d 3"},{"line_number":78,"context_line":"        items_per_page \u003d 1"},{"line_number":79,"context_line":"        networks_names \u003d [\"{0}_{1}\".format(self.NETWORK_NAME, i)"},{"line_number":80,"context_line":"                          for i in range(count)]"},{"line_number":81,"context_line":"        for network_name in networks_names:"}],"source_content_type":"text/x-python","patch_set":8,"id":"e8441512_dbf91695","line":78,"range":{"start_line":78,"start_character":8,"end_line":78,"end_character":26},"updated":"2022-02-07 11:58:49.000000000","message":"It is just my personal opinion to consider atleast 3 items_per_page for better testing here.","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"5b31bd268d278513a50aafa3ef516b0fc25ccaa0","unresolved":true,"context_lines":[{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        networks_page \u003d self.networks_page"},{"line_number":77,"context_line":"        count \u003d 3"},{"line_number":78,"context_line":"        items_per_page \u003d 1"},{"line_number":79,"context_line":"        networks_names \u003d [\"{0}_{1}\".format(self.NETWORK_NAME, i)"},{"line_number":80,"context_line":"                          for i in range(count)]"},{"line_number":81,"context_line":"        for network_name in networks_names:"}],"source_content_type":"text/x-python","patch_set":8,"id":"32148b9d_5bd072b7","line":78,"range":{"start_line":78,"start_character":8,"end_line":78,"end_character":26},"in_reply_to":"e8441512_dbf91695","updated":"2022-02-09 13:57:40.000000000","message":"the main problem increasing this value is that it becomes very easy to hit the default quota limit. I increased it to two per page","commit_id":"4fb61ed280aa5990c21a083e1467dae6e86678ea"}],"releasenotes/notes/add-networks-pagination-4c05d784998fafb2.yaml":[{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"07f040e41e70c15866741cbc27cf9d7e477517d5","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fixed lack of pagination for the networks page under Project and"},{"line_number":5,"context_line":"    Admin tabs."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"418d5e4e_9cc34f3c","line":5,"range":{"start_line":5,"start_character":10,"end_line":5,"end_character":14},"updated":"2022-02-16 13:43:55.000000000","message":"IMO you should use \u0027Dashboard\u0027 here.","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"8c9cf23d003c35ada5efed7ae60691067faa9ec1","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fixed lack of pagination for the networks page under Project and"},{"line_number":5,"context_line":"    Admin tabs."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"8e25ccf1_808bd72b","line":5,"range":{"start_line":5,"start_character":10,"end_line":5,"end_character":14},"in_reply_to":"418d5e4e_9cc34f3c","updated":"2022-02-16 21:21:19.000000000","message":"done","commit_id":"e3f1c2bfdf68718ea0b01660381d8cf49cc3b2f6"}]}
