From 9fcbc8d1efc7b0c8d0bd2c9c01e1da412c0f5f7e Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 24 Apr 2015 16:48:08 +1200 Subject: [PATCH] KCC: docstring for sort_dsa_by_gc_and_guid Signed-off-by: Douglas Bagnall Reviewed-by: Garming Sam Reviewed-by: Andrew Bartlett --- source4/scripting/bin/samba_kcc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc index dbb6d62b9e8..bb04b9328cb 100755 --- a/source4/scripting/bin/samba_kcc +++ b/source4/scripting/bin/samba_kcc @@ -2759,6 +2759,15 @@ def sort_replica_by_dsa_guid(rep1, rep2): def sort_dsa_by_gc_and_guid(dsa1, dsa2): + """Helper to sort DSAs by guid global catalog status + + GC DSAs come before non-GC DSAs, other than that, the guids are + sorted in NDR form. + + :param dsa1: A DSA object + :param dsa2: Another DSA + :return: -1, 0, or 1, indicating sort order. + """ if dsa1.is_gc() and not dsa2.is_gc(): return -1 if not dsa1.is_gc() and dsa2.is_gc(): -- 2.11.4.GIT