1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-14 12:59:07 +03:00

drs_utils: use a given highwatermark and uptodateness_vector in replicate()

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Bob Campbell
2017-01-27 10:40:19 +13:00
committed by Andrew Bartlett
parent 8de09d491d
commit dc0c702f79

View File

@ -198,7 +198,7 @@ class drs_Replicate(object):
def replicate(self, dn, source_dsa_invocation_id, destination_dsa_guid,
schema=False, exop=drsuapi.DRSUAPI_EXOP_NONE, rodc=False,
replica_flags=None):
replica_flags=None, highwatermark=None, udv=None):
'''replicate a single DN'''
# setup for a GetNCChanges call
@ -208,11 +208,16 @@ class drs_Replicate(object):
req8.source_dsa_invocation_id = source_dsa_invocation_id
req8.naming_context = drsuapi.DsReplicaObjectIdentifier()
req8.naming_context.dn = dn
req8.highwatermark = drsuapi.DsReplicaHighWaterMark()
req8.highwatermark.tmp_highest_usn = 0
req8.highwatermark.reserved_usn = 0
req8.highwatermark.highest_usn = 0
req8.uptodateness_vector = None
if highwatermark is not None:
req8.highwatermark = highwatermark
else:
req8.highwatermark = drsuapi.DsReplicaHighWaterMark()
req8.highwatermark.tmp_highest_usn = 0
req8.highwatermark.reserved_usn = 0
req8.highwatermark.highest_usn = 0
req8.uptodateness_vector = udv
if replica_flags is not None:
req8.replica_flags = replica_flags