diff options
author | Matthieu Patou <mat@matws.net> | 2011-08-04 19:59:49 +0400 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2011-08-06 01:10:12 +0400 |
commit | bb865b4a95462ec2f1ed7436adb30dd89c91c65d (patch) | |
tree | 79799825b64aec19d0870fd26640539dd8984962 /source4/scripting/devel | |
parent | 56319cf1b7935d0716a27688361ac19f4e4f74b6 (diff) | |
download | samba-bb865b4a95462ec2f1ed7436adb30dd89c91c65d.tar.gz samba-bb865b4a95462ec2f1ed7436adb30dd89c91c65d.tar.bz2 samba-bb865b4a95462ec2f1ed7436adb30dd89c91c65d.zip |
s4-scripting: allow to specify the number max of iteration around getNcChanges
Diffstat (limited to 'source4/scripting/devel')
-rwxr-xr-x | source4/scripting/devel/getncchanges | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/devel/getncchanges b/source4/scripting/devel/getncchanges index e5b7f8ea4d..736e3db440 100755 --- a/source4/scripting/devel/getncchanges +++ b/source4/scripting/devel/getncchanges @@ -101,6 +101,7 @@ if __name__ == "__main__": parser.add_option("", "--exop", dest="exop", help="extended operation",) parser.add_option("", "--pas", dest="use_pas", action='store_true', default=False, help="send partial attribute set",) + parser.add_option("", "--nb-iter", type='int', help="Number of getncchange iterations") parser.add_option("", "--dest-dsa", type='str', default='"9c637462-5b8c-4467-aef2-bdb1f57bc4ef"', help="destination DSA GUID") parser.add_option("", "--replica-flags", type='int', @@ -170,8 +171,10 @@ if __name__ == "__main__": req8.mapping_ctr.num_mappings = 0 req8.mapping_ctr.mappings = None + nb_iter = 0 while True: (level, ctr) = drs.DsGetNCChanges(drs_handle, 8, req8) - if ctr.more_data == 0: + nb_iter += 1 + if ctr.more_data == 0 or opts.nb_iter == nb_iter: break req8.highwatermark.tmp_highest_usn = ctr.new_highwatermark.tmp_highest_usn |