diff options
author | Martin Basti <mbasti@redhat.com> | 2015-10-26 17:56:57 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2015-10-27 10:29:41 +0100 |
commit | beb6a3236d5c10acd990aaf92eddc74fee456909 (patch) | |
tree | 34aec12aeb6528788a4c5cc37cfdae7dcedfcec0 /ipalib/constants.py | |
parent | 5ab0fcabf3e6ac7970c1803893717301a4b4cfe8 (diff) | |
download | freeipa-beb6a3236d5c10acd990aaf92eddc74fee456909.tar.gz freeipa-beb6a3236d5c10acd990aaf92eddc74fee456909.tar.xz freeipa-beb6a3236d5c10acd990aaf92eddc74fee456909.zip |
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 <pspacek@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipalib/constants.py')
-rw-r--r-- | ipalib/constants.py | 8 |
1 files changed, 6 insertions, 2 deletions
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 |