Version class - Platform - BlueCat Gateway - 24.1

Gateway Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
24.1

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 0.

minor (int)

The minor part of the version. Defaults to 0.

patch (int)

The patch part of the version. Defaults to 0.

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}
Note:

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