watcherclient.common.api_versioning Module¶watcherclient.common.api_versioning.APIVersion(version_str=None)[source]¶Bases: object
This class represents an API Version Request.
This class provides convenience methods for manipulation and comparison of version numbers that we need to do to implement microversions.
get_string()[source]¶Version string representation.
Converts object to string representation which if used to create an APIVersion object results in the same version.
matches(min_version, max_version)[source]¶Matches the version object.
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.
| Parameters: |
|
|---|---|
| Returns: | boolean |
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
watcherclient.common.api_versioning.check_major_version(api_version)[source]¶Checks major part of APIVersion obj is supported.
| Raises: | watcherclient.exceptions.UnsupportedVersion – if major part is not supported |
|---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.