mirror of
https://github.com/samba-team/samba.git
synced 2025-07-22 16:59:09 +03:00
s4/samba-tool: Add --sync-forced flag to 'drs replicate' command
We are going to need this to trigger replication when inbound replication is disabled for a given DC Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Wed Feb 2 09:03:22 CET 2011 on sn-devel-104
This commit is contained in:
@ -247,9 +247,10 @@ 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"),
|
||||
]
|
||||
|
||||
def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False,
|
||||
def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False, sync_forced=False,
|
||||
sambaopts=None,
|
||||
credopts=None, versionopts=None, server=None):
|
||||
|
||||
@ -288,6 +289,8 @@ class cmd_drs_replicate(Command):
|
||||
req1.options |= drsuapi.DRSUAPI_DRS_WRIT_REP
|
||||
if add_ref:
|
||||
req1.options |= drsuapi.DRSUAPI_DRS_ADD_REF
|
||||
if sync_forced:
|
||||
req1.options |= drsuapi.DRSUAPI_DRS_SYNC_FORCED
|
||||
req1.source_dsa_guid = misc.GUID(source_dsa_guid)
|
||||
|
||||
try:
|
||||
|
Reference in New Issue
Block a user