1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07: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:
Jelmer Vernooij
2012-02-06 16:33:38 +01:00
parent d6b4701503
commit a0ff4c349c
17 changed files with 240 additions and 27 deletions

View File

@ -3,7 +3,6 @@
# implement samba_tool drs commands
#
# Copyright Andrew Tridgell 2010
# Copyright Giampaolo Lauria 2011 <lauria2@yahoo.com>
#
# based on C implementation by Kamen Mazdrashki <kamen.mazdrashki@postpath.com>
#
@ -87,6 +86,12 @@ class cmd_drs_showrepl(Command):
synopsis = "%prog [<DC>] [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"versionopts": options.VersionOptions,
"credopts": options.CredentialsOptions,
}
takes_args = ["DC?"]
def print_neighbour(self, n):
@ -192,6 +197,12 @@ class cmd_drs_kcc(Command):
synopsis = "%prog [<DC>] [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"versionopts": options.VersionOptions,
"credopts": options.CredentialsOptions,
}
takes_args = ["DC?"]
def run(self, DC=None, sambaopts=None,
@ -255,6 +266,12 @@ class cmd_drs_replicate(Command):
synopsis = "%prog <destinationDC> <sourceDC> <NC> [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"versionopts": options.VersionOptions,
"credopts": options.CredentialsOptions,
}
takes_args = ["DEST_DC", "SOURCE_DC", "NC"]
takes_options = [
@ -325,6 +342,12 @@ class cmd_drs_bind(Command):
synopsis = "%prog [<DC>] [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"versionopts": options.VersionOptions,
"credopts": options.CredentialsOptions,
}
takes_args = ["DC?"]
def run(self, DC=None, sambaopts=None,
@ -418,6 +441,12 @@ class cmd_drs_options(Command):
synopsis = "%prog [<DC>] [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"versionopts": options.VersionOptions,
"credopts": options.CredentialsOptions,
}
takes_args = ["DC?"]
takes_options = [