mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
samba-tool domain: helper function for domain level names
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Douglas Bagnall
parent
2cdafb9431
commit
6d4015265a
@ -154,6 +154,23 @@ common_ntvfs_options = [
|
||||
]
|
||||
|
||||
|
||||
def level_to_string(level):
|
||||
"""turn the level enum number into a printable string."""
|
||||
if level < DS_DOMAIN_FUNCTION_2000:
|
||||
return "invalid"
|
||||
strings = {
|
||||
DS_DOMAIN_FUNCTION_2000: "2000",
|
||||
DS_DOMAIN_FUNCTION_2003_MIXED: \
|
||||
"2003 with mixed domains/interim (NT4 DC support)",
|
||||
DS_DOMAIN_FUNCTION_2003: "2003",
|
||||
DS_DOMAIN_FUNCTION_2008: "2008",
|
||||
DS_DOMAIN_FUNCTION_2008_R2: "2008 R2",
|
||||
DS_DOMAIN_FUNCTION_2012: "2012",
|
||||
DS_DOMAIN_FUNCTION_2012_R2: "2012 R2",
|
||||
}
|
||||
return strings.get(level, "higher than 2012 R2")
|
||||
|
||||
|
||||
def get_testparm_var(testparm, smbconf, varname):
|
||||
errfile = open(os.devnull, 'w')
|
||||
p = subprocess.Popen([testparm, '-s', '-l',
|
||||
|
Reference in New Issue
Block a user