summaryrefslogtreecommitdiffstats
path: root/ipalib/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/util.py')
-rw-r--r--ipalib/util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipalib/util.py b/ipalib/util.py
index d9221605..9c995825 100644
--- a/ipalib/util.py
+++ b/ipalib/util.py
@@ -150,3 +150,8 @@ def make_repr(name, *args, **kw):
args = [repr(a) for a in args]
kw = ['%s=%r' % (k, kw[k]) for k in sorted(kw)]
return '%s(%s)' % (name, ', '.join(args + kw))
+
+def realm_to_suffix(realm_name):
+ s = realm_name.split(".")
+ terms = ["dc=" + x.lower() for x in s]
+ return ",".join(terms)