Skip to content

block_storage: get quotausage for blockstorage volume_types#3284

Merged
mandre merged 2 commits intogophercloud:mainfrom
stijzermans:add-volume-type-on-quota-usage
Feb 4, 2025
Merged

block_storage: get quotausage for blockstorage volume_types#3284
mandre merged 2 commits intogophercloud:mainfrom
stijzermans:add-volume-type-on-quota-usage

Conversation

@stijzermans
Copy link
Copy Markdown
Contributor

The volume_type attributes are currently only set for QuotaSet objects.

Hence, implemented per volume_type QuotaUsage as a nested object
of QuotaUsageSetfor block storage.

See API docs for refs.

block-storage v3
https://docs.openstack.org/api-ref/block-storage/v3/#show-quota-usage-for-a-project

block-storage v2
https://docs.openstack.org/api-ref/block-storage/v2/#show-quotas

@github-actions github-actions bot added edit:blockstorage This PR updates blockstorage code semver:major Breaking change labels Jan 17, 2025
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first PR! Be sure that we will be looking at it but keep in mind
this sometimes takes a while.
Please let the maintainers know if your PR has not got enough attention after a few days.
If any doubt, please consult our PR tutorial.

@stijzermans stijzermans changed the title feat: add usage objects for blockstorage volume_type quota block_storage: add usage objects for blockstorage volume_type quota Jan 17, 2025
@stijzermans stijzermans changed the title block_storage: add usage objects for blockstorage volume_type quota block_storage: get quotausage for blockstorage volume_types Jan 17, 2025
@stijzermans
Copy link
Copy Markdown
Contributor Author

@mandre - sorry for that, was missing a comma in the test fixture for the v2 block storage schema, which caused the test to fail. Should be all good now.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 78.712% (+0.03%) from 78.683%
when pulling 64958d5 on stijzermans:add-volume-type-on-quota-usage
into 5770765 on gophercloud:main.

Copy link
Copy Markdown
Contributor

@mandre mandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

We won't be able to backport this to branch v2 however, due to the backward incompatible change:

   Incompatible changes:
  - QuotaUsageSet: old is comparable, new is not

@mandre mandre merged commit 9692997 into gophercloud:main Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edit:blockstorage This PR updates blockstorage code semver:major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants