Files
python-cinderclient/cinderclient/shell.py
Johannes Kulik 59824da6c7 Fix talking to older servers
Cinderclient currently supports version 3.71 as defined in
`cinderclient.api_versions.MAX_VERSION`. When doing version discovery,
we create a temporary client with the MAX_VERSION and use this client to
fetch the available versions. If the server doesn't support 3.71, yet,
the version discovery request fails with:

	cinderclient.exceptions.NotAcceptable: Version 3.71 is not supported by the API. Minimum is 3.0 and maximum is 3.70. (HTTP 406)
	ERROR: Version 3.71 is not supported by the API. Minimum is 3.0 and maximum is 3.70. (HTTP 406)

To fix this, we instead create a client with the MIN_VERSION, because
the versions endpoint should be available there already.

NOTE: Even when specifying an `--os-volume-api-version 3.70` the request
fails, because version discovery still takes place in case we have to
downgrade from the requested version.

Change-Id: I38b71cea6b92da7f451e2a02d55900fe18e9aab0
Signed-off-by: Johannes Kulik <johannes.kulik@sap.com>
Closes-Bug: #1998596
2025-07-14 08:52:39 +02:00

42 KiB