1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3:samba-tool: add --domain-critical-only to "samba-tool domain join"

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
Stefan Metzmacher 2011-08-08 11:15:35 +02:00
parent 5d6b848394
commit f34f16f7f8

View File

@ -75,12 +75,16 @@ class cmd_domain_join(Command):
Option("--server", help="DC to join", type=str),
Option("--site", help="site to join", type=str),
Option("--targetdir", help="where to store provision", type=str),
Option("--domain-critical-only",
help="only replicate critical domain objects",
action="store_true"),
]
takes_args = ["domain", "role?"]
def run(self, domain, role=None, sambaopts=None, credopts=None,
versionopts=None, server=None, site=None, targetdir=None):
versionopts=None, server=None, site=None, targetdir=None,
domain_critical_only=False):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
net = Net(creds, lp, server=credopts.ipaddress)
@ -102,11 +106,13 @@ class cmd_domain_join(Command):
return
elif role == "DC":
join_DC(server=server, creds=creds, lp=lp, domain=domain,
site=site, netbios_name=netbios_name, targetdir=targetdir)
site=site, netbios_name=netbios_name, targetdir=targetdir,
domain_critical_only=domain_critical_only)
return
elif role == "RODC":
join_RODC(server=server, creds=creds, lp=lp, domain=domain,
site=site, netbios_name=netbios_name, targetdir=targetdir)
site=site, netbios_name=netbios_name, targetdir=targetdir,
domain_critical_only=domain_critical_only)
return
else:
raise CommandError("Invalid role %s (possible values: MEMBER, BDC, RODC)" % role)