From ec57bc3e44ec5e8f6c7e5e1ad5c56751016e3b09 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 10 Sep 2008 02:50:26 -0400 Subject: Tool for doing configuration updates over LDAP This tool takes as input a file which contains basically an LDIF, prefixed with a command: default, add, remove or only. These define the operations to perform such as adding new entries, adding new sub-entries to an existing entry, adding or modifying attributes in a record. If an index entry is modified a task is created to re-create the index. Schema may be added using this tool. 454031 --- ipa-python/ipautil.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ipa-python/ipautil.py') diff --git a/ipa-python/ipautil.py b/ipa-python/ipautil.py index 649a3f20..780fef3d 100644 --- a/ipa-python/ipautil.py +++ b/ipa-python/ipautil.py @@ -36,6 +36,7 @@ from types import * import re import xmlrpclib import datetime +from ipa import config try: from subprocess import CalledProcessError class CalledProcessError(subprocess.CalledProcessError): @@ -53,6 +54,15 @@ except ImportError: def __str__(self): return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) +def get_domain_name(): + try: + config.init_config() + domain_name = config.config.get_domain() + except Exception, e: + return None + + return domain_name + def realm_to_suffix(realm_name): s = realm_name.split(".") terms = ["dc=" + x.lower() for x in s] -- cgit