Skip to content

Add support for name and description filters when listing Cinder volume types - #3587

Merged
mandre merged 4 commits into
gophercloud:mainfrom
Koodt:add_volumetypes_listopts_field
Jan 2, 2026
Merged

mandre merged 4 commits into
gophercloud:mainfrom
Koodt:add_volumetypes_listopts_field

Conversation

@Koodt

@Koodt Koodt commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

This change adds support for additional server-side filters when listing Cinder volume types

The following filters are now supported:
• Filtering volume types by name
• Filtering volume types by description

Fixes #3586

Added fields: name, description, extra_specs
Added tests
@kayrus

kayrus commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

@Koodt thanks for your effort. Could you please add functional tests as well?

@coveralls

coveralls commented Dec 17, 2025 •

Copy link
Copy Markdown

Coverage Status

coverage: 63.781% (+0.001%) from 63.78%
when pulling 12d6828 on Koodt:add_volumetypes_listopts_field
into 832f6f8 on gophercloud:main.

kayrus
kayrus previously approved these changes Dec 18, 2025

@kayrus kayrus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks

@kayrus

kayrus commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Unfortunately due to added ExtraSpecs map, the PR can not be backported to v2:

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

@mandre @stephenfin do you think we can make an exception?

@mandre

mandre commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Unfortunately due to added ExtraSpecs map, the PR can not be backported to v2:

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

@mandre @stephenfin do you think we can make an exception?

How about we split the PR in two, with all of the changes except for ExtraSpecs in one PR that we can backport to v2 and another one with just ExtraSpecs that we merge in main only?

I'm always a little bit uncomfortable for making exceptions, because it creates a precedent, and also because we never know how people are using the lib.

Thanks for the PR @Koodt. I recently had the same problem (https://github.com/k-orc/openstack-resource-controller/blob/b8d62d3cb3c4b56078228c4377aa9607161036d5/internal/controllers/volumetype/actuator.go#L75-L87) and didn't realize the API actually supported these fields because they're not documented in https://docs.openstack.org/api-ref/block-storage/v3/#list-all-volume-types but forgot that glance uses additional resource filters (https://docs.openstack.org/api-ref/block-storage/v3/#resource-filters-resource-filters).

@Koodt Koodt changed the title Add support for name, description and extra_specs filters when listing Cinder volume types Add support for name and description filters when listing Cinder volume types Dec 22, 2025
@github-actions github-actions Bot added semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 and removed semver:major Breaking change labels Dec 22, 2025
@Koodt

Koodt commented Dec 22, 2025

Copy link
Copy Markdown
Contributor Author

Hi! I've prepare the non-breaking changes for back port to v2
extra_specs will come as a separate MR later

@mandre
mandre added this pull request to the merge queue Jan 2, 2026
Merged via the queue into gophercloud:main with commit fd467e6 Jan 2, 2026
62 checks passed
@github-actions

github-actions Bot commented Jan 2, 2026

Copy link
Copy Markdown

Failed to backport PR to v2 branch. See logs for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v2 This PR will be backported to v2 edit:blockstorage This PR updates blockstorage code semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlockStorage V3: Add server-side filters support for Cinder volume types

4 participants