https://blueprints.launchpad.net/cinder/+spec/metadata-for-volume-summary
Support get volumes’ metadata through volume summary API.
Currently, Cinder supports filter volumes with metadata. But in some case, users don’t know what metadata all the volumes contain or what metadata is valid to filter volumes. Then users need to show the volumes one by one to get the correct metadata, this is really a heavy and unfriendly way. Imaging that if there are hundreds of volumes, admin users will take a very long time to query all metadata.
1. For users, they can get all the metadata easily just through one API request. 2. For dashboard, such as Horizon, it can use this metadata information to show end users a dropdown list.
All the volumes’ metadata can be got by the sql query.
Add a new micro version. Add “metadata” to volume-summary API response body. The body will be like:
"metadata": {"key1": ["value1"],"key2": ["value2", "value3"]}
Leave as it is. Let the operators get volumes metadata by themselves through some peripheral ways. Such as, create a script to call volume-list-detail API and then analyse the result one by one.
None
A new microversion will be created.
Now both OpenStackClient and CinderClient don’t support volume-summary command. We can add them as well.
None
None
None
There is a little performance influence about volume-summary API since a new sql query action will be added.
None
None
None
Update API documentation.
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.