Patch attached.
From 16aa96f0446a7b351763fc8061497d82fdeedbdf Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 3 Nov 2015 10:37:15 +0100
Subject: [PATCH] Use domain level constants in topology plugin

---
 ipalib/plugins/topology.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ipalib/plugins/topology.py b/ipalib/plugins/topology.py
index 2b82215e273d959fdb207801ed146b843460bae5..2c43758c3136a546a50472cf97d79129d1d6c738 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))
         )
 
 
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to