def erase_users_computers(self, dn):
"""Erases user and computer objects from our AD.
-
+
This is needed since the 'samldb' module denies the deletion of primary
groups. Therefore all groups shouldn't be primary somewhere anymore.
"""
def erase_except_schema_controlled(self):
"""Erase this ldb.
-
+
:note: Removes all records, except those that are controlled by
Samba4's schema.
"""
def check_all_substituted(text):
- """Make sure that all substitution variables in a string have been replaced.
+ """Check that all substitution variables in a string have been replaced.
+
If not, raise an exception.
:param text: The text to search for substitution variables
var_start = text.find("${")
var_end = text.find("}", var_start)
- raise Exception("Not all variables substituted: %s" % text[var_start:var_end+1])
+ raise Exception("Not all variables substituted: %s" %
+ text[var_start:var_end+1])
def read_and_sub_file(file_name, subst_vars):
"""Add a location to sys.path if an external dependency can't be found.
:param modulename: Module name to import
- :param location: Location to add to sys.path (can be relative to
- ${srcdir}/lib
+ :param location: Location to add to sys.path (can be relative to
+ ${srcdir}/lib)
"""
try:
__import__(modulename)
except ImportError:
if in_source_tree():
- sys.path.insert(0,
+ sys.path.insert(0,
os.path.join(os.path.dirname(__file__),
"../../../../lib", location))
__import__(modulename)
version = _glue.version
interface_ips = _glue.interface_ips
set_debug_level = _glue.set_debug_level
+get_debug_level = _glue.get_debug_level
+unix2nttime = _glue.unix2nttime
+nttime2string = _glue.nttime2string
+nttime2unix = _glue.nttime2unix
unix2nttime = _glue.unix2nttime
generate_random_password = _glue.generate_random_password
-talloc_report_full = _glue.talloc_report_full
-talloc_enable_null_tracking = _glue.talloc_enable_null_tracking
-talloc_total_blocks = _glue.talloc_total_blocks