Support Cinder API version 2
This specification proposes to add support for the second version of the Cinder
API, which brings useful improvements and will soon replace version one.
Currently Sahara uses only version 1 of Cinder API to create volumes. Version
two, however, brings useful features such as scheduler hints, more consistent
responses, caching, filtering, etc.
Also, Cinder is deprecating version 1 in favor of 2, so supporting both would
make switching easier for users.
- As a developer I want to be able to pass scheduler hints to Cinder when
creating clusters, in order to choose volumes more precisely and achieve
- As a developer I want filtering into my requests to Cinder to make queries
- As a deployer I want to be able to choose between legacy Cinder API v1 and
newer v2 API.
The implementation will add a configuration option, cinder_api_version, that
will be defaulted to:
but can be changed to
by modifying sahara.conf.
The client() method in sahara/utils/openstack/cinder.py will either return
clientv1() or clientv2() depending on the configuration.
Wait for Cinder API v1 to be deprecated and switch abruptly to v2.
Other end user impact
- If the deployer wants to keep using Cinder API version 1, nothing has to be
- If the deployer wants to upgrade to version 2, the cinder_api_version option
in sahara.conf should be overwritten.
Developers can read CONF.cinder_api_version to know what API version is being
Sahara-dashboard / Horizon impact
- Primary assignee:
- Add a configuration option: cinder_api_version.
- Put some magic in sahara/utils/openstack/cinder.py to pick the correct Cinder
client depending on the configuration.
Same as for v1 API.