summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-05-14 11:49:23 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-05-15 21:13:27 +0200
commit72e18d671c48045cbc162e0650926e4038fcbb3f (patch)
tree3b30db18ef5242a0c237caa8bafe91dd5b91a2f8 /python
parentf55eab600fef592204056823ea82d89c11bd0bef (diff)
downloadsamba-72e18d671c48045cbc162e0650926e4038fcbb3f.tar.gz
samba-72e18d671c48045cbc162e0650926e4038fcbb3f.tar.bz2
samba-72e18d671c48045cbc162e0650926e4038fcbb3f.zip
samba-tool domain: Spit out common options between dcpromo and join
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/domain.py44
1 files changed, 18 insertions, 26 deletions
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 9f914ea0403..24159fcc742 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -120,6 +120,21 @@ common_provision_join_options = [
Option("--quiet", help="Be quiet", action="store_true"),
]
+common_join_options = [
+ Option("--server", help="DC to join", type=str),
+ Option("--site", help="site to join", type=str),
+ Option("--domain-critical-only",
+ help="only replicate critical domain objects",
+ action="store_true"),
+ Option("--dns-backend", type="choice", metavar="NAMESERVER-BACKEND",
+ choices=["SAMBA_INTERNAL", "BIND9_DLZ", "NONE"],
+ help="The DNS server backend. SAMBA_INTERNAL is the builtin name server (default), "
+ "BIND9_DLZ uses samba4 AD to store zone information, "
+ "NONE skips the DNS setup entirely (this DC will not be a DNS server)",
+ default="SAMBA_INTERNAL"),
+ Option("--verbose", help="Be verbose", action="store_true")
+]
+
common_ntvfs_options = [
Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)",
action="store_true")
@@ -573,20 +588,8 @@ class cmd_domain_dcpromo(Command):
"credopts": options.CredentialsOptions,
}
- takes_options = [
- Option("--server", help="DC to join", type=str),
- Option("--site", help="site to join", type=str),
- Option("--domain-critical-only",
- help="only replicate critical domain objects",
- action="store_true"),
- Option("--dns-backend", type="choice", metavar="NAMESERVER-BACKEND",
- choices=["SAMBA_INTERNAL", "BIND9_DLZ", "NONE"],
- help="The DNS server backend. SAMBA_INTERNAL is the builtin name server (default), "
- "BIND9_DLZ uses samba4 AD to store zone information, "
- "NONE skips the DNS setup entirely (this DC will not be a DNS server)",
- default="SAMBA_INTERNAL"),
- Option("--verbose", help="Be verbose", action="store_true")
- ]
+ takes_options = []
+ takes_options.extend(common_join_options)
takes_options.extend(common_provision_join_options)
@@ -650,27 +653,16 @@ class cmd_domain_join(Command):
}
takes_options = [
- Option("--server", help="DC to join", type=str),
- Option("--site", help="site to join", type=str),
Option("--parent-domain", help="parent domain to create subdomain under", type=str),
- Option("--domain-critical-only",
- help="only replicate critical domain objects",
- action="store_true"),
Option("--adminpass", type="string", metavar="PASSWORD",
help="choose adminstrator password when joining as a subdomain (otherwise random)"),
- Option("--dns-backend", type="choice", metavar="NAMESERVER-BACKEND",
- choices=["SAMBA_INTERNAL", "BIND9_DLZ", "NONE"],
- help="The DNS server backend. SAMBA_INTERNAL is the builtin name server (default), "
- "BIND9_DLZ uses samba4 AD to store zone information, "
- "NONE skips the DNS setup entirely (this DC will not be a DNS server)",
- default="SAMBA_INTERNAL"),
- Option("--verbose", help="Be verbose", action="store_true")
]
ntvfs_options = [
Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)",
action="store_true")
]
+ takes_options.extend(common_join_options)
takes_options.extend(common_provision_join_options)
if samba.is_ntvfs_fileserver_built():