The cinder.api.openstack.api_version_request Module

class APIVersionRequest(version_string=None, experimental=False)

Bases: cinder.utils.ComparableMixin

This class represents an API Version Request.

This class includes convenience methods for manipulation and comparison of version numbers as needed to implement API microversions.

get_string()

Returns a string representation of this object.

If this method is used to create an APIVersionRequest, the resulting object will be an equivalent request.

is_null()
matches(min_version, max_version=None, experimental=False)

Compares this version to the specified min/max range.

Returns whether the version object represents a version greater than or equal to the minimum version and less than or equal to the maximum version.

If min_version is null then there is no minimum limit. If max_version is null then there is no maximum limit. If self is null then raise ValueError.

Parameters:
  • min_version – Minimum acceptable version.
  • max_version – Maximum acceptable version.
  • experimental – Whether to match experimental APIs.
Returns:

boolean

matches_versioned_method(method)

Compares this version to that of a versioned method.

legacy_api_version1()
legacy_api_version2()
max_api_version()
min_api_version()

Previous topic

The cinder.api.middleware.sizelimit Module

Next topic

The cinder.api.openstack.versioned_method Module

This Page