diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-02-06 22:06:09 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-02-07 01:11:08 +0100 |
commit | 7c8476b434a9e305ecb90712d800e6560b45200f (patch) | |
tree | 8ca87656d5d65454c5acc27ef308485781952bdc | |
parent | 8443e15eee28603bf427abc03ac1a8d86d23b12a (diff) | |
download | samba-7c8476b434a9e305ecb90712d800e6560b45200f.tar.gz samba-7c8476b434a9e305ecb90712d800e6560b45200f.tar.bz2 samba-7c8476b434a9e305ecb90712d800e6560b45200f.zip |
samba-tool: Add optiongroups, necessary for 'samba-tool domain ...'
-rw-r--r-- | source4/scripting/python/samba/netcmd/domain.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py index 664db18f5b..1f2c7de957 100644 --- a/source4/scripting/python/samba/netcmd/domain.py +++ b/source4/scripting/python/samba/netcmd/domain.py @@ -93,6 +93,7 @@ class cmd_domain_export_keytab(Command): net = Net(None, lp) net.export_keytab(keytab=keytab, principal=principal) + class cmd_domain_info(Command): """Print basic info about a domain and the DC passed as parameter""" @@ -101,6 +102,12 @@ class cmd_domain_info(Command): takes_options = [ ] + takes_optiongroups = { + "sambaopts": options.SambaOptions, + "credopts": options.CredentialsOptions, + "versionopts": options.VersionOptions, + } + takes_args = ["address"] def run(self, address, credopts=None, sambaopts=None, versionopts=None): @@ -118,7 +125,6 @@ class cmd_domain_info(Command): raise CommandError("Invalid IP address '" + address + "'!") - class cmd_domain_join(Command): """Joins domain as either member or backup domain controller""" @@ -202,6 +208,11 @@ class cmd_domain_demote(Command): Option("--targetdir", help="where provision is stored", type=str), ] + takes_optiongroups = { + "sambaopts": options.SambaOptions, + "credopts": options.CredentialsOptions, + "versionopts": options.VersionOptions, + } def run(self, sambaopts=None, credopts=None, versionopts=None, server=None, targetdir=None): @@ -244,9 +255,6 @@ class cmd_domain_demote(Command): print "Using %s as partner server for the demotion" % server (drsuapiBind, drsuapi_handle, supportedExtensions) = drsuapi_connect(server, lp, creds) - - - print "Desactivating inbound replication" nmsg = ldb.Message() @@ -422,7 +430,6 @@ class cmd_domain_demote(Command): self.outf.write("Demote successfull\n") - class cmd_domain_level(Command): """Raises domain and forest function levels""" @@ -837,7 +844,7 @@ class cmd_domain_samba3upgrade(Command): if not os.path.exists(smbconf): raise CommandError("File %s does not exist" % smbconf) - + if testparm and not os.path.exists(testparm): raise CommandError("Testparm utility %s does not exist" % testparm) |