From a0ff4c349c6b75f9e5fa6b4ad0e69a4aa8e471b0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 6 Feb 2012 16:33:38 +0100 Subject: Revert "samba-tool: moved takes_optiongroups definition to Command base class" This reverts commit f6fa8684896b8f3f9f8b7bd3742c99906973274c. 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 --- source4/scripting/python/samba/netcmd/spn.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'source4/scripting/python/samba/netcmd/spn.py') diff --git a/source4/scripting/python/samba/netcmd/spn.py b/source4/scripting/python/samba/netcmd/spn.py index 0f01a49fc4a..3b9db7407b9 100644 --- a/source4/scripting/python/samba/netcmd/spn.py +++ b/source4/scripting/python/samba/netcmd/spn.py @@ -3,7 +3,6 @@ # spn management # # Copyright Matthieu Patou mat@samba.org 2010 -# Copyright Giampaolo Lauria 2011 # # 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 @@ -38,6 +37,12 @@ class cmd_spn_list(Command): synopsis = "%prog [options]" + takes_optiongroups = { + "sambaopts": options.SambaOptions, + "credopts": options.CredentialsOptions, + "versionopts": options.VersionOptions, + } + takes_args = ["user"] def run(self, user, credopts=None, sambaopts=None, versionopts=None): @@ -75,6 +80,11 @@ class cmd_spn_add(Command): synopsis = "%prog [options]" + takes_optiongroups = { + "sambaopts": options.SambaOptions, + "credopts": options.CredentialsOptions, + "versionopts": options.VersionOptions, + } takes_options = [ Option("--force", help="Force the addition of the spn"\ " even it exists already", action="store_true"), @@ -129,6 +139,12 @@ class cmd_spn_delete(Command): synopsis = "%prog [user] [options]" + takes_optiongroups = { + "sambaopts": options.SambaOptions, + "credopts": options.CredentialsOptions, + "versionopts": options.VersionOptions, + } + takes_args = ["name", "user?"] def run(self, name, user=None, credopts=None, sambaopts=None, versionopts=None): -- cgit