)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6b8134473b88187931ad29b8e7dcdd894296b675","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the quota APIs."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To make the unit tests work, we had to make the caching of the quota"},{"line_number":13,"context_line":"driver slightly more dynamic, by caching multiple drivers in a dict,"},{"line_number":14,"context_line":"rather than a single driver."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We also test the current unified limits driver, as it is currently"},{"line_number":17,"context_line":"identical in behaviour to the noop driver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bf51134e_f991d348","line":14,"range":{"start_line":13,"start_character":33,"end_line":14,"end_character":28},"updated":"2020-06-24 21:01:02.000000000","message":"this is not true in latest changes. may be saying re-verify the cached driver before return.\n\nthis line made me search the drivers dict until i saw the old PS :).","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bae6aad5ad3dee4dbdc7f65b822b02e75bed3448","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the quota APIs."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To make the unit tests work, we had to make the caching of the quota"},{"line_number":13,"context_line":"driver slightly more dynamic, by caching multiple drivers in a dict,"},{"line_number":14,"context_line":"rather than a single driver."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We also test the current unified limits driver, as it is currently"},{"line_number":17,"context_line":"identical in behaviour to the noop driver."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"727efbb1_489e7420","line":14,"range":{"start_line":13,"start_character":33,"end_line":14,"end_character":28},"in_reply_to":"bf51134e_f991d348","updated":"2021-05-04 16:27:58.000000000","message":"Ooops, fixed that.","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"67e656b9872f13e9a10fac0a5caa2b8a1442742a","unresolved":true,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To make the unit tests work, we had to make the caching of the quota"},{"line_number":13,"context_line":"driver slightly more dynamic. We verify the current config matches"},{"line_number":14,"context_line":"the currently cached driver, and reload the driver if there is a miss-match."},{"line_number":15,"context_line":"It also preserves the ability of some unit tests to pass in a fake"},{"line_number":16,"context_line":"quota driver."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"aa7ae27f_353d866d","line":14,"range":{"start_line":14,"start_character":65,"end_line":14,"end_character":76},"updated":"2021-05-10 16:23:37.000000000","message":"nit: mismatch\n\nalso, wrapping at \u003c 72 chars would be nice","commit_id":"1924cf9953c47ca7b50f015c00eb4d7e9c5a3e41"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c27022c2c7575fb33f32cfb15beab0792d6bfb5d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"77e1a1b1_209690e8","updated":"2021-10-20 15:51:21.000000000","message":"This looks good from what I can see, +1 as its a little bit my code.","commit_id":"047c91ab6f23590a741a9dfe9e413cefc5cbd982"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cc19eba167ce466264999f9370549cc68d43646b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"519f1f83_0f77d2c5","updated":"2021-10-15 18:40:35.000000000","message":"recheck openstacksdk-functional-devstack unrelated","commit_id":"047c91ab6f23590a741a9dfe9e413cefc5cbd982"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ef3619cb8a525b446d5662ffbc9abb7bf83012ff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"a2e45d55_9d91e202","updated":"2021-11-12 19:12:18.000000000","message":"recheck [Errno 2] No such file or directory: \u0027tox\u0027","commit_id":"d27f1313449b10f3ea877bdfff9671b1dd88aa44"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d0fd80a13be071e0584dfff0eeedce844d0a6d42","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"d8ccd7dd_5ac3c50d","updated":"2022-01-27 19:23:35.000000000","message":"recheck Could not connect to mirror.gra1.ovh.opendev.org:443 (149.202.160.10). - connect (111: Connection refused)","commit_id":"21eafab5637da3fef4d4580cda5d2fcc4f457500"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cebd5e0063f969cc856e5277b466ff3c462f6b38","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"e3f44935_e509c423","updated":"2022-01-28 00:20:35.000000000","message":"recheck Jan 27 21:58:06.666900 ubuntu-focal-rax-iad-0028206564 nova-compute[105847]: ERROR nova.virt.libvirt.driver [None req-92f83bd6-99f5-467d-857b-41124dad6f4e tempest-TestShelveInstance-102369519 tempest-TestShelveInstance-102369519-project] Failed to snapshot image: rbd.ReadOnlyImage: [errno 30] RBD read-only image (error creating snapshot b\u0027a153de97a5834121a387aab391c4b5da\u0027 from b\u002784550362-6515-4036-ba90-b94661f67bdc_disk\u0027)","commit_id":"21eafab5637da3fef4d4580cda5d2fcc4f457500"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"4796058f527853847b0070309228630145975f67","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"99a714a1_763acbe5","updated":"2022-02-24 22:04:01.000000000","message":"recheck","commit_id":"6acefc6b101401686ef03f672fdc6d5be1b32ae1"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"04ec54f0341930e830588cc136382dcef935702a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"1d27190f_04de498e","updated":"2022-02-25 05:53:05.000000000","message":"recheck dpkg: error processing package pcp (--configure):","commit_id":"6acefc6b101401686ef03f672fdc6d5be1b32ae1"}],"nova/api/openstack/compute/quota_classes.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c75fddc94c0a712dba4aa9cb87194e0b75a9f2a5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from nova import utils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"QUOTAS \u003d quota.QUOTAS"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# NOTE(gmann): Quotas which were returned in v2 but in v2.1 those"},{"line_number":32,"context_line":"# were not returned. Fixed in microversion 2.50. Bug#1693168."}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_2baf6b2a","side":"PARENT","line":29,"updated":"2020-03-10 17:47:16.000000000","message":"Note to self: not sure I need this change in the end...","commit_id":"3fd6871accfd5ddfba2de776a15ffde6e835f320"}],"nova/conf/quota.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2a288017c0fc105c1b52b2c8a9ceadaf815f8631","unresolved":false,"context_lines":[{"line_number":181,"context_line":"             \u0027on-demand.\u0027),"},{"line_number":182,"context_line":"            (\u0027nova.quota.NoopQuotaDriver\u0027, \u0027Ignores quota and treats all \u0027"},{"line_number":183,"context_line":"             \u0027resources as unlimited.\u0027),"},{"line_number":184,"context_line":"            (\u0027nova.quota.UnifiedLimitsDriver\u0027, \u0027Do not use. Still being \u0027"},{"line_number":185,"context_line":"             \u0027developed.\u0027)"},{"line_number":186,"context_line":"        ],"},{"line_number":187,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_e26676c1","line":184,"updated":"2020-03-31 07:40:47.000000000","message":"If we add the config value here then I feel the whole stack of patches needs to be merge at once to avoid exposing a half baked quota driver.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f464923128d0170279425795794410fedfa53ee5","unresolved":false,"context_lines":[{"line_number":181,"context_line":"             \u0027on-demand.\u0027),"},{"line_number":182,"context_line":"            (\u0027nova.quota.NoopQuotaDriver\u0027, \u0027Ignores quota and treats all \u0027"},{"line_number":183,"context_line":"             \u0027resources as unlimited.\u0027),"},{"line_number":184,"context_line":"            (\u0027nova.quota.UnifiedLimitsDriver\u0027, \u0027Do not use. Still being \u0027"},{"line_number":185,"context_line":"             \u0027developed.\u0027)"},{"line_number":186,"context_line":"        ],"},{"line_number":187,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_a8bff6a7","line":184,"in_reply_to":"df33271e_9cb37d0a","updated":"2020-04-01 13:37:54.000000000","message":"OK. Looking at the whole series this do look like a feature flag and it is properly documented that it is a WIP.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3126b8a403a4af04927499d91f4741a9ac03ca79","unresolved":false,"context_lines":[{"line_number":181,"context_line":"             \u0027on-demand.\u0027),"},{"line_number":182,"context_line":"            (\u0027nova.quota.NoopQuotaDriver\u0027, \u0027Ignores quota and treats all \u0027"},{"line_number":183,"context_line":"             \u0027resources as unlimited.\u0027),"},{"line_number":184,"context_line":"            (\u0027nova.quota.UnifiedLimitsDriver\u0027, \u0027Do not use. Still being \u0027"},{"line_number":185,"context_line":"             \u0027developed.\u0027)"},{"line_number":186,"context_line":"        ],"},{"line_number":187,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_b7b7fc3a","line":184,"in_reply_to":"df33271e_a8bff6a7","updated":"2020-04-06 07:11:04.000000000","message":"Oh, I was going to suggest maybe not adding the UnifiedLimitsDriver as a choice until the end, as a way to avoid having it be merged in a half-baked way. But I guess that prevents us from even programmatically configuring it as the driver for unit and func tests...","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6ac70213c39e053a2c663c8c2f057271a4bd7f22","unresolved":false,"context_lines":[{"line_number":181,"context_line":"             \u0027on-demand.\u0027),"},{"line_number":182,"context_line":"            (\u0027nova.quota.NoopQuotaDriver\u0027, \u0027Ignores quota and treats all \u0027"},{"line_number":183,"context_line":"             \u0027resources as unlimited.\u0027),"},{"line_number":184,"context_line":"            (\u0027nova.quota.UnifiedLimitsDriver\u0027, \u0027Do not use. Still being \u0027"},{"line_number":185,"context_line":"             \u0027developed.\u0027)"},{"line_number":186,"context_line":"        ],"},{"line_number":187,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_049edeb7","line":184,"in_reply_to":"df33271e_b7b7fc3a","updated":"2020-06-24 21:16:46.000000000","message":"one way is to convert the \u0027choices\u0027 into more help and code code checks\n- help message to tell allowed driver\n- in quota engine __init__ we can check if this config option is other than DbQuotaDriver or NoopQuotaDriver then error. this way we keep config interoperability of not allowing any other driver.\n\nWith that we can add new UnifiedLimitsDriver as valid value in __init__during development of this driver and at the end of this series we can expose the new driver in help message along with reno.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ad6260ccffebf8537508ea15a10ac194f9c56395","unresolved":false,"context_lines":[{"line_number":181,"context_line":"             \u0027on-demand.\u0027),"},{"line_number":182,"context_line":"            (\u0027nova.quota.NoopQuotaDriver\u0027, \u0027Ignores quota and treats all \u0027"},{"line_number":183,"context_line":"             \u0027resources as unlimited.\u0027),"},{"line_number":184,"context_line":"            (\u0027nova.quota.UnifiedLimitsDriver\u0027, \u0027Do not use. Still being \u0027"},{"line_number":185,"context_line":"             \u0027developed.\u0027)"},{"line_number":186,"context_line":"        ],"},{"line_number":187,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_9cb37d0a","line":184,"in_reply_to":"df33271e_e26676c1","updated":"2020-03-31 08:42:30.000000000","message":"Its really the unit tests. This seemed better than the previous way I exposed everything via a *new* config.\n\nI went for the log that it is broken approach.\n\nTotally open to ideas though for something better. I just couldn\u0027t find anything that worked OK with the unit tests, without being really nasty.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"88ae70e1dbd4cb6a741a9ed5d60ee6fcf269494c","unresolved":true,"context_lines":[{"line_number":182,"context_line":"            (\u0027nova.quota.NoopQuotaDriver\u0027, \u0027Ignores quota and treats all \u0027"},{"line_number":183,"context_line":"             \u0027resources as unlimited.\u0027),"},{"line_number":184,"context_line":"            (\u0027nova.quota.UnifiedLimitsDriver\u0027, \u0027Do not use. Still being \u0027"},{"line_number":185,"context_line":"             \u0027developed.\u0027)"},{"line_number":186,"context_line":"        ],"},{"line_number":187,"context_line":"        help\u003d\"\"\""},{"line_number":188,"context_line":"Provides abstraction for quota checks. Users can configure a specific"}],"source_content_type":"text/x-python","patch_set":14,"id":"4f831327_04e8f998","line":185,"updated":"2021-11-04 15:03:42.000000000","message":"we can accept this as we\u0027re far from FF now.","commit_id":"047c91ab6f23590a741a9dfe9e413cefc5cbd982"}],"nova/quota.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"df1745696c968da1e8832ddd1981570170286a28","unresolved":false,"context_lines":[{"line_number":894,"context_line":"            # layer to ease the transition, when unified limits is enabled."},{"line_number":895,"context_line":"            driver_name \u003d \"nova.quota.UnifiedLimitsDriver\""},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        # pick every time, so unit tests are easier to write"},{"line_number":898,"context_line":"        driver \u003d self.__drivers.get(driver_name)"},{"line_number":899,"context_line":"        if driver is None:"},{"line_number":900,"context_line":"            driver \u003d importutils.import_object(driver_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_c3718446","line":897,"updated":"2020-03-17 00:13:44.000000000","message":"Sorry, I don\u0027t understand what this means without looking through the test code :P Would be nice to explain it briefly here for future readers.\n\nFrom what I see, the self.__driver is initialized at QuotaEngine instantiation time which is a global var in nova/quota.py which happens at quota module import time. So there\u0027s no way to adjust the driver via the conf flag in tests otherwise.","commit_id":"c5b1d74780985973ccccffdb1af0e1053dc50472"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a18d8ee63b2ccf923d086efa0b3e146c75a8e6cf","unresolved":false,"context_lines":[{"line_number":894,"context_line":"            # layer to ease the transition, when unified limits is enabled."},{"line_number":895,"context_line":"            driver_name \u003d \"nova.quota.UnifiedLimitsDriver\""},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        # pick every time, so unit tests are easier to write"},{"line_number":898,"context_line":"        driver \u003d self.__drivers.get(driver_name)"},{"line_number":899,"context_line":"        if driver is None:"},{"line_number":900,"context_line":"            driver \u003d importutils.import_object(driver_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_6c92d0f8","line":897,"in_reply_to":"1fa4df85_c3718446","updated":"2020-03-23 16:54:28.000000000","message":"Good point, I should expand the note.","commit_id":"c5b1d74780985973ccccffdb1af0e1053dc50472"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2a288017c0fc105c1b52b2c8a9ceadaf815f8631","unresolved":false,"context_lines":[{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        # NOTE(johngarbutt) to allow unit tests to change the driver by"},{"line_number":894,"context_line":"        # simply overriding config, double check if we have the correct"},{"line_number":895,"context_line":"        # driver cached before we return the currently cached driver"},{"line_number":896,"context_line":"        driver_name_in_config \u003d CONF.quota.driver"},{"line_number":897,"context_line":"        if self.__driver_name !\u003d driver_name_in_config:"},{"line_number":898,"context_line":"            self.__driver \u003d importutils.import_object(driver_name_in_config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_ffa1f247","line":895,"updated":"2020-03-31 07:40:47.000000000","message":"This whole complication seems to originate from the fact that nova/quota.py:1314 defines module global QuotaEngine instance through that unit tests can interfere.\n\nIt seem now we have two ways to overwrite the driver in test. Can we have only one way? Either by passing a driver in the __init__ or via config.\n\nSure this means that some test needs refactoring. I tried it quickly but both directions are nontrivial. So I won\u0027t block on this.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6b8134473b88187931ad29b8e7dcdd894296b675","unresolved":false,"context_lines":[{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        # NOTE(johngarbutt) to allow unit tests to change the driver by"},{"line_number":894,"context_line":"        # simply overriding config, double check if we have the correct"},{"line_number":895,"context_line":"        # driver cached before we return the currently cached driver"},{"line_number":896,"context_line":"        driver_name_in_config \u003d CONF.quota.driver"},{"line_number":897,"context_line":"        if self.__driver_name !\u003d driver_name_in_config:"},{"line_number":898,"context_line":"            self.__driver \u003d importutils.import_object(driver_name_in_config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_f916f3a7","line":895,"in_reply_to":"df33271e_7cadd999","updated":"2020-06-24 21:01:02.000000000","message":"with this logic it is possible to drop the __driver_override (if that was meant only for tests) and also update NoopQuotaDriverFixture also. but this is separate things to fix. i agree not to do in this series.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ad6260ccffebf8537508ea15a10ac194f9c56395","unresolved":false,"context_lines":[{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        # NOTE(johngarbutt) to allow unit tests to change the driver by"},{"line_number":894,"context_line":"        # simply overriding config, double check if we have the correct"},{"line_number":895,"context_line":"        # driver cached before we return the currently cached driver"},{"line_number":896,"context_line":"        driver_name_in_config \u003d CONF.quota.driver"},{"line_number":897,"context_line":"        if self.__driver_name !\u003d driver_name_in_config:"},{"line_number":898,"context_line":"            self.__driver \u003d importutils.import_object(driver_name_in_config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_7cadd999","line":895,"in_reply_to":"df33271e_ffa1f247","updated":"2020-03-31 08:42:30.000000000","message":"I totally agree with you, and I basically decided it wasn\u0027t worth the mess.\n\nIf I remember correctly, the problem is the tests are doing two separate things, one is chaning an actual driver, the other is stubbing out the driver with a mock/fake, as far as I could see.\n\nHaving said all that, certainly worth a tidy up. This was the simplest, least complex way I could get the tests working. Kinda bad we didn\u0027t test this before, but it landed before unit tests were a hard requirement, as I understand it.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3126b8a403a4af04927499d91f4741a9ac03ca79","unresolved":false,"context_lines":[{"line_number":1341,"context_line":"        AbsoluteResource(\u0027security_groups\u0027),"},{"line_number":1342,"context_line":"        AbsoluteResource(\u0027security_group_rules\u0027),"},{"line_number":1343,"context_line":"    ],"},{"line_number":1344,"context_line":")"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":""},{"line_number":1347,"context_line":"def _valid_method_call_check_resource(name, method, resources):"}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_57467023","line":1344,"updated":"2020-04-06 07:11:04.000000000","message":"I\u0027ve wondered if we could wrap this inside a global init() method that takes a quota driver class and then test that want to swap in the UnifiedLimitsDriver could just call nova.quota.init(quota_driver\u003dUnifiedLimitsDriver) instead of making it a config choice? (until the end of the series)\n\nI\u0027m probably missing something about why this idea wouldn\u0027t work though.","commit_id":"bb2b45fb7b47ec304331513964204ab5f3486a74"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6b8134473b88187931ad29b8e7dcdd894296b675","unresolved":false,"context_lines":[{"line_number":893,"context_line":"        # NOTE(johngarbutt) to allow unit tests to change the driver by"},{"line_number":894,"context_line":"        # simply overriding config, double check if we have the correct"},{"line_number":895,"context_line":"        # driver cached before we return the currently cached driver"},{"line_number":896,"context_line":"        driver_name_in_config \u003d CONF.quota.driver"},{"line_number":897,"context_line":"        if self.__driver_name !\u003d driver_name_in_config:"},{"line_number":898,"context_line":"            self.__driver \u003d importutils.import_object(driver_name_in_config)"},{"line_number":899,"context_line":"            self.__driver_name \u003d driver_name_in_config"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"        return self.__driver"},{"line_number":902,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_797943c6","line":899,"range":{"start_line":896,"start_character":0,"end_line":899,"end_character":54},"updated":"2020-06-24 21:01:02.000000000","message":"can you add tests for this in nova/tests/unit/test_quota.py\nto show:\n\n- test within same test class or different can get the correct driver based on what they override to CONF.quota.driver.\n\nalso should we update the NoopQuotaDriverFixture comment also as self.flag will keep working now? that comment confused me till i review this logic again.\n\nhttps://github.com/openstack/nova/blob/6f6b63ee5f7ae180d5f81e61f04332f7aa14f9be/nova/tests/fixtures.py#L2228","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bae6aad5ad3dee4dbdc7f65b822b02e75bed3448","unresolved":false,"context_lines":[{"line_number":893,"context_line":"        # NOTE(johngarbutt) to allow unit tests to change the driver by"},{"line_number":894,"context_line":"        # simply overriding config, double check if we have the correct"},{"line_number":895,"context_line":"        # driver cached before we return the currently cached driver"},{"line_number":896,"context_line":"        driver_name_in_config \u003d CONF.quota.driver"},{"line_number":897,"context_line":"        if self.__driver_name !\u003d driver_name_in_config:"},{"line_number":898,"context_line":"            self.__driver \u003d importutils.import_object(driver_name_in_config)"},{"line_number":899,"context_line":"            self.__driver_name \u003d driver_name_in_config"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"        return self.__driver"},{"line_number":902,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"cfdc23d9_fbac8e99","line":899,"range":{"start_line":896,"start_character":0,"end_line":899,"end_character":54},"in_reply_to":"bf51134e_797943c6","updated":"2021-05-04 16:27:58.000000000","message":"Good call, done.","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"88ae70e1dbd4cb6a741a9ed5d60ee6fcf269494c","unresolved":true,"context_lines":[{"line_number":892,"context_line":""},{"line_number":893,"context_line":"        # NOTE(johngarbutt) to allow unit tests to change the driver by"},{"line_number":894,"context_line":"        # simply overriding config, double check if we have the correct"},{"line_number":895,"context_line":"        # driver cached before we return the currently cached driver"},{"line_number":896,"context_line":"        driver_name_in_config \u003d CONF.quota.driver"},{"line_number":897,"context_line":"        if self.__driver_name !\u003d driver_name_in_config:"},{"line_number":898,"context_line":"            self.__driver \u003d importutils.import_object(driver_name_in_config)"}],"source_content_type":"text/x-python","patch_set":14,"id":"934a624b_bd3446a0","line":895,"updated":"2021-11-04 15:03:42.000000000","message":"I\u0027m not super happy to modify our code for testing reasons, but OK.","commit_id":"047c91ab6f23590a741a9dfe9e413cefc5cbd982"}],"nova/tests/unit/api/openstack/compute/test_limits.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6b8134473b88187931ad29b8e7dcdd894296b675","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        super(NoopLimitsControllerTest, self).setUp()"},{"line_number":486,"context_line":"        self.flags(driver\u003dself.quota_driver, group\u003d\"quota\")"},{"line_number":487,"context_line":"        self.controller \u003d limits_v21.LimitsController()"},{"line_number":488,"context_line":"        # remove policy checks"},{"line_number":489,"context_line":"        patcher \u003d self.mock_can \u003d mock.patch(\u0027nova.context.RequestContext.can\u0027)"},{"line_number":490,"context_line":"        self.mock_can \u003d patcher.start()"},{"line_number":491,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    def test_index_v21(self):"},{"line_number":494,"context_line":"        req \u003d fakes.HTTPRequest.blank(\"/\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_39822bc9","line":491,"range":{"start_line":488,"start_character":0,"end_line":491,"end_character":37},"updated":"2020-06-24 21:01:02.000000000","message":"may be we should provide a NoopPolicyFixture for easiness and consistency on skipping the policy.\n\nBut we  can do later should not be part of unified limit.","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"}],"nova/tests/unit/api/openstack/compute/test_quota_classes.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6b8134473b88187931ad29b8e7dcdd894296b675","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.filtered_quotas.extend(quota_classes_v21.FILTERED_QUOTAS_2_57)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"class NoopLimitsQuotaClassesTest(test.NoDBTestCase):"},{"line_number":164,"context_line":"    quota_driver \u003d \"nova.quota.NoopQuotaDriver\""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_9970970a","line":163,"range":{"start_line":163,"start_character":6,"end_line":163,"end_character":32},"updated":"2020-06-24 21:01:02.000000000","message":"may be rename it to NoopQuotaClassesSetTest as \u0027Limits\u0027 word confused me with limit controller vs quota_class controller","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bae6aad5ad3dee4dbdc7f65b822b02e75bed3448","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.filtered_quotas.extend(quota_classes_v21.FILTERED_QUOTAS_2_57)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"class NoopLimitsQuotaClassesTest(test.NoDBTestCase):"},{"line_number":164,"context_line":"    quota_driver \u003d \"nova.quota.NoopQuotaDriver\""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"f254f199_37f1fc2a","line":163,"range":{"start_line":163,"start_character":6,"end_line":163,"end_character":32},"in_reply_to":"bf51134e_9970970a","updated":"2021-05-04 16:27:58.000000000","message":"Ah, good point, done.","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6b8134473b88187931ad29b8e7dcdd894296b675","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                          req, \u0027test_class\u0027, body\u003dbody)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    @mock.patch.object(objects.Quotas, \"update_class\")"},{"line_number":218,"context_line":"    def test_update_v257(self, mock_update):"},{"line_number":219,"context_line":"        req \u003d fakes.HTTPRequest.blank(\"\", version\u003d\u00272.57\u0027)"},{"line_number":220,"context_line":"        body \u003d {\u0027quota_class_set\u0027: {\u0027ram\u0027: 51200}}"},{"line_number":221,"context_line":"        response \u003d self.controller.update(req, \u0027default\u0027, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_19d3e7d6","line":218,"range":{"start_line":218,"start_character":8,"end_line":218,"end_character":24},"updated":"2020-06-24 21:01:02.000000000","message":"can we add test_update_v21 also to verify we still update injected* limits with nothing. This can be useful later in the series when unified limit start returning configuration value on update and we make sure those cover injected* limit also.","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bae6aad5ad3dee4dbdc7f65b822b02e75bed3448","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                          req, \u0027test_class\u0027, body\u003dbody)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    @mock.patch.object(objects.Quotas, \"update_class\")"},{"line_number":218,"context_line":"    def test_update_v257(self, mock_update):"},{"line_number":219,"context_line":"        req \u003d fakes.HTTPRequest.blank(\"\", version\u003d\u00272.57\u0027)"},{"line_number":220,"context_line":"        body \u003d {\u0027quota_class_set\u0027: {\u0027ram\u0027: 51200}}"},{"line_number":221,"context_line":"        response \u003d self.controller.update(req, \u0027default\u0027, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fb089d08_7ed0ddec","line":218,"range":{"start_line":218,"start_character":8,"end_line":218,"end_character":24},"in_reply_to":"bf51134e_19d3e7d6","updated":"2021-05-04 16:27:58.000000000","message":"I think it seemed like overkill given the shared code and tests, but that is probably a bad assumption, I have added it in.","commit_id":"45c3d95756871c34f8eb7a6955ebacf67b02dfef"}],"nova/tests/unit/api/openstack/compute/test_quotas.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6bf67e78e1fef262bab3a00b0166a08d3fc1325a","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        self.assertEqual(expected_response, response)"},{"line_number":835,"context_line":"        mock_create.assert_called_with(req.environ[\u0027nova.context\u0027],"},{"line_number":836,"context_line":"                                       uuids.project_id, \"key_pairs\", 52,"},{"line_number":837,"context_line":"                                       user_id\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_0b794fc6","line":837,"updated":"2020-03-10 17:48:10.000000000","message":"Note to self: loads more tests to add here.","commit_id":"1edff1c2d5fc27bd3f021641fab1ef0bbf6ebae5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a6c63ed16338543a8bb7fc67aa2ce0d4a6544be0","unresolved":false,"context_lines":[{"line_number":829,"context_line":"        self.assertEqual(expected_response, response)"},{"line_number":830,"context_line":"        mock_create.assert_called_once_with(req.environ[\u0027nova.context\u0027],"},{"line_number":831,"context_line":"                                            uuids.project_id, \"key_pairs\", 52,"},{"line_number":832,"context_line":"                                            user_id\u003dNone)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_6897803c","line":832,"updated":"2020-03-12 15:18:06.000000000","message":"I think we have more tests to add here...","commit_id":"e2af881cabf28af225909b315ca9735ff6d926ba"}]}
