Utilities & Decorators
ucmdb_rest.utils.requires_version(min_version_tuple)
Decorator to gate methods based on the UCMDB server version.
This decorator compares the server version stored in the client instance against a required minimum. It is designed to be used on methods within service classes (e.g., Topology, System) that have a 'self.client' attribute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_version_tuple
|
tuple of int
|
The minimum version required to execute the method (e.g., (11, 13, 0)). |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the connected UCMDB server version is lower than the required minimum version. |
Notes
All methods present in the library as of UCMDB 2023.05 (internal version 11.6.11) are considered the baseline and do not require this decorator. Use this for any functionality added in later releases.