1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-21 12:59:09 +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

@ -5,7 +5,6 @@
# Copyright Matthieu Patou mat@samba.org 2010
# Copyright Stefan Metzmacher metze@samba.org 2011
# Copyright Bjoern Baumbach bb@sernet.de 2011
# Copyright Giampaolo Lauria 2011 <lauria2@yahoo.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -41,6 +40,12 @@ class cmd_delegation_show(Command):
synopsis = "%prog <accountname> [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
"versionopts": options.VersionOptions,
}
takes_args = ["accountname"]
def run(self, accountname, credopts=None, sambaopts=None, versionopts=None):
@ -80,6 +85,12 @@ class cmd_delegation_for_any_service(Command):
synopsis = "%prog <accountname> [(on|off)] [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
"versionopts": options.VersionOptions,
}
takes_args = ["accountname", "onoff"]
def run(self, accountname, onoff, credopts=None, sambaopts=None, versionopts=None):
@ -116,6 +127,12 @@ class cmd_delegation_for_any_protocol(Command):
synopsis = "%prog <accountname> [(on|off)] [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
"versionopts": options.VersionOptions,
}
takes_args = ["accountname", "onoff"]
def run(self, accountname, onoff, credopts=None, sambaopts=None, versionopts=None):
@ -152,6 +169,12 @@ class cmd_delegation_add_service(Command):
synopsis = "%prog <accountname> <principal> [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
"versionopts": options.VersionOptions,
}
takes_args = ["accountname", "principal"]
def run(self, accountname, principal, credopts=None, sambaopts=None, versionopts=None):
@ -189,6 +212,12 @@ class cmd_delegation_del_service(Command):
synopsis = "%prog <accountname> <principal> [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"credopts": options.CredentialsOptions,
"versionopts": options.VersionOptions,
}
takes_args = ["accountname", "principal"]
def run(self, accountname, principal, credopts=None, sambaopts=None, versionopts=None):