KCC: docstring for sort_dsa_by_gc_and_guid
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 24 Apr 2015 04:48:08 +0000 (16:48 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 30 May 2015 19:05:24 +0000 (21:05 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/samba_kcc

index dbb6d62b9e81f1dfcef23dc6aa4c793ba7a62d11..bb04b9328cb48d7a49cdbc86e3367df424127b43 100755 (executable)
@@ -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():