Blockstorage extensions limits#2084
Conversation
|
Build failed.
|
|
@TenSt Thank you for working on this. The OpenLab failure is from the acceptance test you've added. You can see the log here: https://logs.openlabtesting.org/logs/84/2084/1f255e0aca45b3545996a6691c5c93121b8e213e/check/gophercloud-acceptance-test/6eee85a/job-output.txt.gz and search for the string The cause of the error looks to be from the backup created in the previous test not deleting in time for the new test to run. I recommend changing the assertion to compare against snapshots, maybe.
The code that builds the rate can be found here: https://github.com/openstack/cinder/blob/master/cinder/api/views/limits.py#L56-L91 It looks like there's a unit test within Cinder that details how the data structure should look: https://github.com/openstack/cinder/blob/84a084d1bdc88c649c1f3b728beb36dd0707dc22/cinder/tests/unit/api/v2/test_limits.py#L119-L156 You can use this code for your own test fixture, which should allow you to create a detailed struct for the Please let me know if you have any questions. |
|
@jtopjian Thank you for the review and pointing out where to find rate object. Rate part of Limits: Acceptance tests: |
|
Build failed.
|
…r the non-default values
|
Build succeeded.
|
|
@jtopjian I've fixed acceptance tests, so PR is ready for the next review round. |
|
Build succeeded.
|
For #1702
All links are already included in the issue.
Notes on Limits struct:
The original code contains fields only for max values, but API docs states that there are also total values. I've tested out on OpenStack Ussuri and I see that API docs are valid. I'm not very good at python, so might've missed where exactly total fields are added to the response.
Original code: https://github.com/openstack/cinder/blob/master/cinder/api/views/limits.py#L42-L48
API docs: https://docs.openstack.org/api-ref/block-storage/v3/index.html?#show-absolute-limits-for-project
Also, I've left "rate" as interface because it is not clear from the code what will return there and docs example is just an empty array (as well as response from real OpenStack).
Note on acceptance test: the hard-coded values are default ones, so should work for any OpenStack Project with default values.