summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-23 17:38:08 +1000
committerAndrew Tridgell <tridge@samba.org>2011-10-04 15:08:56 +1100
commitaed0d2e5ebfa15a08f30dc1ebde584ad8722d055 (patch)
treefc134866cd2dd3b6a332ba896b0f586af64e96a3 /source4/scripting/python
parent5d4f474b58e209f171bd5976242db4a1dc2af2ee (diff)
downloadsamba-aed0d2e5ebfa15a08f30dc1ebde584ad8722d055.tar.gz
samba-aed0d2e5ebfa15a08f30dc1ebde584ad8722d055.tar.bz2
samba-aed0d2e5ebfa15a08f30dc1ebde584ad8722d055.zip
samba-tool: added --full-sync and --sync-all options to samba-tool drs replicate
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/drs.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/netcmd/drs.py b/source4/scripting/python/samba/netcmd/drs.py
index e7a3cbfa08..78b998e0f5 100644
--- a/source4/scripting/python/samba/netcmd/drs.py
+++ b/source4/scripting/python/samba/netcmd/drs.py
@@ -276,12 +276,14 @@ class cmd_drs_replicate(Command):
takes_options = [
Option("--add-ref", help="use ADD_REF to add to repsTo on source", action="store_true"),
Option("--sync-forced", help="use SYNC_FORCED to force inbound replication", action="store_true"),
+ Option("--sync-all", help="use SYNC_ALL to replicate from all DCs", action="store_true"),
+ Option("--full-sync", help="resync all objects", action="store_true"),
Option("--local", help="pull changes directly into the local database (destination DC is ignored)", action="store_true"),
]
- def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False, sync_forced=False, local=False,
- sambaopts=None,
- credopts=None, versionopts=None, server=None):
+ def run(self, DEST_DC, SOURCE_DC, NC,
+ add_ref=False, sync_forced=False, sync_all=False, full_sync=False,
+ local=False, sambaopts=None, credopts=None, versionopts=None, server=None):
self.server = DEST_DC
self.lp = sambaopts.get_loadparm()
@@ -325,6 +327,10 @@ class cmd_drs_replicate(Command):
req1.options |= drsuapi.DRSUAPI_DRS_ADD_REF
if sync_forced:
req1.options |= drsuapi.DRSUAPI_DRS_SYNC_FORCED
+ if sync_all:
+ req1.options |= drsuapi.DRSUAPI_DRS_SYNC_ALL
+ if full_sync:
+ req1.options |= drsuapi.DRSUAPI_DRS_FULL_SYNC_NOW
req1.source_dsa_guid = misc.GUID(source_dsa_guid)
try: