1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-20 08:59:06 +03:00

samba-tool: moved takes_optiongroups definition to Command base class

The option groups should be defined at the Command base class level as they are in common across all samba-tool commands.
Major move advantages:
1. more OOP approach
2. enforcing consistency across commands
3. avoiding the need of declaring for every new command

Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
Giampaolo Lauria
2011-07-15 12:07:03 -04:00
committed by Andrew Tridgell
parent 1dfcb019d2
commit f6fa868489
19 changed files with 23 additions and 240 deletions

View File

@ -4,6 +4,7 @@
# Unix SMB/CIFS implementation.
# Test validity of smb.conf
# Copyright (C) Karl Auer 1993, 1994-1998
# Copyright Giampaolo Lauria 2011 <lauria2@yahoo.com>
#
# Extensively modified by Andrew Tridgell, 1995
# Converted to popt by Jelmer Vernooij (jelmer@nl.linux.org), 2002
@ -45,11 +46,6 @@ class cmd_testparm(Command):
synopsis = ""
takes_optiongroups = {
"sambaopts": options.SambaOptions,
"versionopts": options.VersionOptions
}
takes_options = [
Option("--section-name", type=str,
help="Limit testparm to a named section"),