From beb6a3236d5c10acd990aaf92eddc74fee456909 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Mon, 26 Oct 2015 17:56:57 +0100 Subject: Domain levels: use constants rather than hardcoded values Added constants for domain levels DOMAIN_LEVEL_0 = 0 DOMAIN_LEVEL_1 = 1 This allows to search for domain level easier in code. Reviewed-By: Petr Spacek Reviewed-By: Tomas Babej --- ipalib/constants.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ipalib/constants.py') diff --git a/ipalib/constants.py b/ipalib/constants.py index b3642bc85..fc0560ba4 100644 --- a/ipalib/constants.py +++ b/ipalib/constants.py @@ -234,8 +234,12 @@ LDAP_GENERALIZED_TIME_FORMAT = "%Y%m%d%H%M%SZ" IPA_ANCHOR_PREFIX = ':IPA:' SID_ANCHOR_PREFIX = ':SID:' -MIN_DOMAIN_LEVEL = 0 -MAX_DOMAIN_LEVEL = 1 +# domains levels +DOMAIN_LEVEL_0 = 0 # compat +DOMAIN_LEVEL_1 = 1 # replica promotion, topology plugin + +MIN_DOMAIN_LEVEL = DOMAIN_LEVEL_0 +MAX_DOMAIN_LEVEL = DOMAIN_LEVEL_1 # Constants used in generation of replication agreements and as topology # defaults -- cgit