1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +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("--server", help="DC to join", type=str),
Option("--site", help="site to join", type=str), Option("--site", help="site to join", type=str),
Option("--targetdir", help="where to store provision", 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?"] takes_args = ["domain", "role?"]
def run(self, domain, role=None, sambaopts=None, credopts=None, 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() lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp) creds = credopts.get_credentials(lp)
net = Net(creds, lp, server=credopts.ipaddress) net = Net(creds, lp, server=credopts.ipaddress)
@ -102,11 +106,13 @@ class cmd_domain_join(Command):
return return
elif role == "DC": elif role == "DC":
join_DC(server=server, creds=creds, lp=lp, domain=domain, 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 return
elif role == "RODC": elif role == "RODC":
join_RODC(server=server, creds=creds, lp=lp, domain=domain, 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 return
else: else:
raise CommandError("Invalid role %s (possible values: MEMBER, BDC, RODC)" % role) raise CommandError("Invalid role %s (possible values: MEMBER, BDC, RODC)" % role)