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.
min_version – Minimum acceptable version.
max_version – Maximum acceptable version.
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.
allow_start_end_audit_time
(requested_version)[source]¶Check if we should support optional start/end attributes for Audit.
Version 1.1 of the API added support for start and end time of continuous audits.
watcherclient.common.api_versioning.
check_major_version
(api_version)[source]¶Checks major part of APIVersion
obj is supported.
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.