mirror of
https://github.com/samba-team/samba.git
synced 2025-07-29 15:42:04 +03:00
Revert "samba-tool: moved takes_optiongroups definition to Command base class"
This reverts commit f6fa868489
.
This keeps the main command class fairly slim, and makes it a bit
more obvious where the arguments to run() are coming from.
Conflicts:
source4/scripting/python/samba/netcmd/__init__.py
source4/scripting/python/samba/netcmd/domain.py
source4/scripting/python/samba/netcmd/gpo.py
source4/scripting/python/samba/netcmd/newuser.py
source4/scripting/python/samba/netcmd/testparm.py
source4/scripting/python/samba/netcmd/user.py
source4/scripting/python/samba/tests/samba_tool/__init__.py
This commit is contained in:
@ -76,6 +76,12 @@ class cmd_domain_export_keytab(Command):
|
||||
|
||||
synopsis = "%prog <keytab> [options]"
|
||||
|
||||
takes_optiongroups = {
|
||||
"sambaopts": options.SambaOptions,
|
||||
"credopts": options.CredentialsOptions,
|
||||
"versionopts": options.VersionOptions,
|
||||
}
|
||||
|
||||
takes_options = [
|
||||
Option("--principal", help="extract only this principal", type=str),
|
||||
]
|
||||
@ -118,6 +124,12 @@ class cmd_domain_join(Command):
|
||||
|
||||
synopsis = "%prog <dnsdomain> [DC|RODC|MEMBER|SUBDOMAIN] [options]"
|
||||
|
||||
takes_optiongroups = {
|
||||
"sambaopts": options.SambaOptions,
|
||||
"versionopts": options.VersionOptions,
|
||||
"credopts": options.CredentialsOptions,
|
||||
}
|
||||
|
||||
takes_options = [
|
||||
Option("--server", help="DC to join", type=str),
|
||||
Option("--site", help="site to join", type=str),
|
||||
@ -407,7 +419,7 @@ class cmd_domain_demote(Command):
|
||||
except ldb.LdbError, l:
|
||||
pass
|
||||
|
||||
print "Demote successfull"
|
||||
self.outf.write("Demote successfull\n")
|
||||
|
||||
|
||||
|
||||
@ -416,6 +428,12 @@ class cmd_domain_level(Command):
|
||||
|
||||
synopsis = "%prog (show|raise <options>) [options]"
|
||||
|
||||
takes_optiongroups = {
|
||||
"sambaopts": options.SambaOptions,
|
||||
"credopts": options.CredentialsOptions,
|
||||
"versionopts": options.VersionOptions,
|
||||
}
|
||||
|
||||
takes_options = [
|
||||
Option("-H", "--URL", help="LDB URL for database or target server", type=str,
|
||||
metavar="URL", dest="H"),
|
||||
@ -609,7 +627,6 @@ class cmd_domain_level(Command):
|
||||
raise CommandError("invalid argument: '%s' (choose from 'show', 'raise')" % subcommand)
|
||||
|
||||
|
||||
|
||||
class cmd_domain_passwordsettings(Command):
|
||||
"""Sets password settings
|
||||
|
||||
@ -619,6 +636,12 @@ class cmd_domain_passwordsettings(Command):
|
||||
|
||||
synopsis = "%prog (show|set <options>) [options]"
|
||||
|
||||
takes_optiongroups = {
|
||||
"sambaopts": options.SambaOptions,
|
||||
"versionopts": options.VersionOptions,
|
||||
"credopts": options.CredentialsOptions,
|
||||
}
|
||||
|
||||
takes_options = [
|
||||
Option("-H", "--URL", help="LDB URL for database or target server", type=str,
|
||||
metavar="URL", dest="H"),
|
||||
|
Reference in New Issue
Block a user