diff options
| author | Martin Basti <mbasti@redhat.com> | 2015-11-03 10:37:15 +0100 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2015-11-10 13:49:50 +0100 |
| commit | c339abbad1e82a264afc5cf9efa3aff80814aeaf (patch) | |
| tree | fdd28902ac66b340394ee9e1f8688acb323dc7e1 | |
| parent | 50b0471f01985d2d43998df1a9c4a73cf5cf47c1 (diff) | |
| download | freeipa-c339abbad1e82a264afc5cf9efa3aff80814aeaf.tar.gz freeipa-c339abbad1e82a264afc5cf9efa3aff80814aeaf.tar.xz freeipa-c339abbad1e82a264afc5cf9efa3aff80814aeaf.zip | |
Use domain level constants in topology plugin
Reviewed-By: David Kupka <dkupka@redhat.com>
| -rw-r--r-- | ipalib/plugins/topology.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ipalib/plugins/topology.py b/ipalib/plugins/topology.py index 2b82215e2..2c43758c3 100644 --- a/ipalib/plugins/topology.py +++ b/ipalib/plugins/topology.py @@ -12,6 +12,7 @@ from ipalib.plugins.baseldap import ( LDAPRetrieve) from ipalib import _, ngettext from ipalib import output +from ipalib.constants import DOMAIN_LEVEL_1 from ipalib.util import create_topology_graph, get_topology_connection_errors from ipapython.dn import DN @@ -28,15 +29,13 @@ Requires minimum domain level 1. register = Registry() -MINIMUM_DOMAIN_LEVEL = 1 - def validate_domain_level(api): current = int(api.Command.domainlevel_get()['result']) - if current < MINIMUM_DOMAIN_LEVEL: + if current < DOMAIN_LEVEL_1: raise errors.InvalidDomainLevelError( reason=_('Topology management requires minimum domain level {0} ' - .format(MINIMUM_DOMAIN_LEVEL)) + .format(DOMAIN_LEVEL_1)) ) |
