Click a link to jump to the indicated section.
class
bluecat_libraries.address_manager.version.Version(major=0, minor=0, patch=0)
Bases: object
A representation of the version of a BlueCat Address Manager.
| Parameters | Description |
|---|---|
| major (int) |
The major part of the version. Defaults to |
| minor (int) |
The minor part of the version. Defaults to |
| patch (int) |
The patch part of the version. Defaults to |
It consists of three integer values for the major, minor, and patch parts of the
version. The parts can be addressed through their name or index. It supports comparison to
strings, sequences, mappings.
Example:
>>> v1 = Version(11, 22, 33)
>>> assert v1.major == 11
>>> assert v1[2] == 33
>>> assert str(v1) == "11.22.33"
>>> assert repr(v1) == "Version(major=11, minor=22, patch=33)"
>>> v2 = Version(minor=44)
>>> assert v2 == (0, 44)
>>> assert [0, 44, 0] == v2
>>> assert v2 == {"patch": 0, "minor": 44}
Slices of the version are tuples. They are different from slices of the string representation of the same version.
>>> v1 = Version(11, 22, 33)
>>> assert v1[:2] == (11, 22)
>>> assert str(v1)[:2] == "11"
New in version 23.1.0.
property
major
The major part of the version.
Return type: int
property
minor
The minor part of the version.
Return type: int
property
patch
The patch part of the version.
Return type: int